I am using Prawn to generate PDFs. Prawn can load images very readily, but I need to be able to render images or other PDFs inside the PDFs I'm generating with Prawn.
Has anyone tried to do this? Is it possible?
I have to just merge the external PDF together with the generated one
How do you combine PDFs in ruby?
Related
We are building a web app where the user can make a design by using fabric.js and at the end he should receive a pdf file with his work.
At first, we tried to use JSPDF because it was prefered to have a cliente-side solution. However by doing pdf.addImage(canvas.toDataURL(),...) we are rasterizing the design.
In second place, we tried server side solution using WKHTMLTOPDF, sending canvas.toSVG(), but there are some issues with fonts and shapes rendering.
The designs are complex as they can have text, shapes, images and svg.
We also tried INKSCAPE (inkscape --without-gui --export-pdf ...), MPDF and MUPDF without good results. IMAGEMAGICK is not a solution has it also rasterize the design.
The main goal is to get a vector pdf, where it's possible to increase size and where the elements of the design are selectable, and if possible that pdf should be ready to print (300 dpi and cmyk)
Yes its possible using TCPDF library.
Please check this ImageSVG api for more information for converting SVG to PDF.
https://tcpdf.org/examples/example_058/
Export the canvas to svg and use pdflib to make the pdf.
You can find an exemple here:https://www.pdflib.com/pdflib-cookbook/graphics/starter-svg/
I can't figure out how to do like this page http://service.citroen.com/ddb/modeles/c5/c5_c5/ed10-07/de_de/4_21_c5-al-ed10-2007.pdf I embed usually the PDF from slideside in my site but people cant dowload from because they need to have an accoount. So technically how ? Thanks
You will need a PDF viewer component for displaying the PDF. You will have to configure the PDF component so as to limit download and print options.
http://www.gnostice.com/nl_article.asp?id=329&t=Display_PDF_without_saving_file_to_disk_in_WinForms_and_ASP_NET
i need a tuto about using pdf.js or viewejs to view pdf via browser. I found viewerjs.org but it doesn't help.
Any help thx in advance.
Try out pdf.js as it is very simple. Download the latest version here.
To show the pdf files traverse to web/viewer.html and it should load its default pdf.
As to the question about how to show your pdf's use: viewer.html?file=relative/path/to/your/pdf.
Say for example inside the web folder(the one in which viewer.html is there) of your pdf.js you create a directory say named pdfFiles and in it you add a pdf named say mypdf.pdf in it then to display it use: viewer.html?file=pdfFiles/mypdf.pdf and it will display it.
Almost all browsers are supported. Look here to know more about which all browsers are currently being supported.
Is it possible to convert tiff file into a PDF file, using pdfclown?
I've started a project using PDFClown, and I'm afarid I got stuck (maybe I'll have to switch to IText now...)
Thanks.
No, it isn't. PDFClown supports only JPEG images, as stated on their Features page.
Can anyone suggest/recommend a product that can be used to dynamically produce PDFs that can contain high-res images?
We're currently using a product called Highwire from a company called Corda to produce PDFs of our HTML pages.
Highwire is crap at producing PDFs though becuase it does not conform to HTML standards (i.e. it requires table layouts rather than CSS/Div layouts). We have to use it though because it is capable of incorporating high-definition SVG images into its PDF output.
Thanks
Dave
What about Prince?
It can handle XHTML and CSS just fine as well as SVG.
I used Apache FOP together with this stylesheet from HTML to XSL-FO with success in some projects. Embedding SVG ist straight forward, since FOP incorporates Batik, Apache's SVG library. You can copy SVG images 1:1 to the XSL-FO file.