10369

PDF manipulation [closed]

Question:

I would like to ask you a question please. I’m discussing one project with potential client and they have a bit of specific request. They want a system for ordering and printing jobs and one section of this system requires certain PHP manipulation. They would like to use a PDF template as one layer, allow user to define text (in a certain size, font type and colour) as another layer and then combine this into a single printable PDF.

Or it could be even in .ai Adobe Illustrator format but I am not aware of any technology that could do this, hence my suggestion with PDF.

Do you know of any technology, library or maybe even JavaScript library that could take PDF base template and then add customisable text on it and create PDF output?

Answer1:

I am not sure if that is what you want to do but I would create the template with php (for example using fPDF) and then create a tool that would let you edit the template's php allowing you to introduce changes to attributes like number of cells, cell height etc. and generate second PDF that meets your requirements (the final one).

You have to keep in mind there will be many potential problems, for example UTF-8 encoding, if you want to let the users select the font, etc.

Answer2:

If you can do it in PHP, there are <a href="http://www.tcpdf.org/" rel="nofollow">TCPDF</a> (which I used quite heavily without any problems) or <a href="http://www.fpdf.org/" rel="nofollow">FPDF</a>.<br /> Pretty powerful and very easy to use.

UPDATE: I just remembered <a href="http://www.setasign.com/products/fpdi/about/" rel="nofollow">this library, FPDI</a>: I never used it, but looks like it probably do exactly what you need.

<em>(But I now doubt I understood your question properly, because with a simple Google search you can find those very easily...Did I miss something?)</em>

Answer3:

You could try PDF overlays. There are several PDF libraries that can do this. Here is how to do with my company's product: <a href="http://www.gnostice.com/nl_article.asp?id=148&t=PDF_Overlay_Stitching_PDF_Pages_Together_in_NET" rel="nofollow">http://www.gnostice.com/nl_article.asp?id=148&t=PDF_Overlay_Stitching_PDF_Pages_Together_in_NET</a>

<img alt="This image shows two pdf pages that have been overlaid." class="b-lazy" data-src="https://i.stack.imgur.com/JAGSb.png" data-original="https://i.stack.imgur.com/JAGSb.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

Recommend

  • SVG to SWF Conversion
  • CosmosDB - SubDocument Delselecting - LINQ Query
  • Merging SVG paths of several neighboring US states
  • Is it really necessary to provide all the different app icon sizes for an iOS app?
  • cout not printing unsigned char
  • How can I run my development action on my Google Home?
  • Pandas: remove duplicates that exist in any order
  • Request for comments on simple Alex parser
  • How to pretty print using jq, so that multiple values are on the same line?
  • Normalize a string except ñ
  • Stream webcam via. Wowza streaming server
  • Create unique ids for a group
  • Flex: DataGrid column formatting of numbers
  • How i change fill color of graphics in create js
  • Samsung Galaxy Tab 10.1 and -webkit-tap-highlight-color style?
  • KornShell Printf - Padding a string
  • What is RSL (Runtime shared library ) used for in flash?
  • Error in GGally: Error in unit(tic_pos.c, “mm”) : 'x' and 'units' must have leng
  • Can my PDF ping my server when it is opened?
  • ggplot2: make the points on the line a darker color than the line color
  • OSX - always hide certain files
  • Find group of records that match multiple values
  • Tamper-proof configuration files in .NET?
  • Xamarin Forms - UWP Fonts
  • Sails.js/waterline: Executing waterline queries in toJSON function of a model?
  • WinForms: two way TextBox problem
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • Change an a tag attribute in JavaScript based on screen width
  • Redux, normalised entities and lodash merge
  • Font Awesome Showing Box instead of Icons
  • Do create extension work in single-user mode in postgres?
  • Properly structure and highlight a GtkPopoverMenu using PyGObject
  • Unanticipated behavior
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • how does django model after text[] in postgresql [duplicate]
  • How do I configure my settings file to work with unit tests?
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • Is it possible to post an object from jquery to bottle.py?
  • Binding checkboxes to object values in AngularJs
  • Python/Django TangoWithDjango Models and Databases