mekentosj / podofo

PoDoFo is a library to work with the PDF file format. The name comes from the first letter of PDF (Portable Document Format). A few tools to work with PDF files are already included in the PoDoFo package. This repo is a fork of the code at http://svn.code.sf.net/p/podofo/code/podofo/trunk
GNU General Public License v2.0
53 stars 29 forks source link

Image format not supported #9

Open lodgerz opened 5 years ago

lodgerz commented 5 years ago

Hi, i want to convert some jpg in one pdf, but podofoimg2pdf says error:

$ podofoimg2pdf pippo.pdf -useimagesize *.jpg
[...]
Error: An error 44 ocurred during processing the pdf file.

PoDoFo encountered an error. Error: 44 ePdfError_UnsupportedImageFormat
    Error Description: This image format is not supported by PoDoFO.
    Callstack:
    #0 Error Source: /build/podofo/src/podofo-0.9.5/src/doc/PdfImage.cpp:233
        Information: -useimagesize

Can I solve?

Example of image: https://s15.postimg.cc/jys2u8f8b/pag-042_1_L.jpg

If i run it without "-useimagesize" the pdf has too much right margin.

NitroNils commented 2 years ago

I have the same issue, though error code 45.

lodgerz commented 2 years ago

I have the same issue, though error code 45.

Use img2pdf, is better

zvezdochiot commented 2 years ago

Use img2pdf, is better

Hi @lodgerz .

Img2pdf for JPG is not better. Better - jpeg2pdf.