Is there easy way to produce pdf from image?

The application code generates images in .png or .jpg format. Is there an simple way to output a pdf file from these images ? If not, a general crate of pdf processing capable of transfoming image to pdf is also ok.

Generally not, and in some cases absolutely not.

There is a spectrum of ways in which you can make a PDF from an image:

  • you can make a PDF that contains a blank page with an embedded illustration on it that is the exact image file that you have. This is doable with existing tooling, but also it's usually entirely pointless, because you end up with a larger more complex file that has no advantages over the original image file. No vectors, no text, no accessibility. Same or worse quality. Pure waste and overhead.

  • or process the content of the image to understand what it contains, and rebuild equivalent content using PDF's features. You'd need to parse the text (OCR) and shapes (vector tracing) in it. This is a very complex problem that has no general high-quality solution yet. It might be doable in specific cases (for example if the input images you need to work with always have the same layout, use the same fonts), or be literally a lifetime of work in image processing algorithms and artificial intelligence.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.