I have a number of PDF template files with complex content and a number of blank regions/areas in them. I have to be able to write text in those blank areas and save the resulting PDFs in a folder.
I googled for answers on this concern quite intensively, however I didn’t discover guaranteed responses. Among the better services is PDF:: Toolkit, however it would require the purchase of Adobe Acrobat to include replaceable qualities to existing PDF documents.
The PHP world is blessed with FPDI that can be utilized to merely open a PDF file and write/draw on it over the existing material. There is a Ruby port of this library, but the last devote for it happened at the start of 2009. Likewise that task does not appear like it is widely used and supported.
The question is: Exactly what is the much better Ruby way of modifying, writing or drawing on existing PDFs?
you need to absolutely check out Prawn gem, by which you can produce any custom-made pdf files. You can in fact use prawn to write in text into existing pdfs by dealing with the existing PDF as a design template for your new Prawn document.
The template functionality isn’t actually operating in later variation. The latest variant I might find out to partner with templates is actually 1.0.0. Could possibly certainly not discover any kind of later variation which collaborates with style themes.
PDFtk is one more qualified tool for PDF manipulation as well as to deal with design templates. It aims out following factors,
Best I may think of is Rails-latex, it does not enable you to customize existing PDF reports however it would permit you to establish theme *. tex.erb which you may dynamically individualize as well as assemble them right into PDF layout (aside from dvi and a variety of others).
I suggest prawn for making PDFs and also after that using combine_pdf to incorporate 2 made PDFs together into one. I utilize it similar to this and it operates simply fine.
After design template help was actually deprecated in Shellfish, I strong wind up making up a Ruby execution for including PDF documents, noting all of them, combining all of them (in turn in addition to one in addition to the other), featuring basic message, extracting PDF fonts and other easy work.
This collection is free for personal consumption, nevertheless needs a permit if used in creation
This is actually a non-ruby demand line resource