JPEG to PDF file output file size

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

Ignacev
Posts: 4
Joined: Thu Feb 27, 2025 7:38 am

JPEG to PDF file output file size

Post by Ignacev »

I convert .jpg to .pdf. I see 50kB for the .jpg file size. The result is a .pdf with file size 8360 KB. How can I reduce that? I am using Win11 64 bit.
cday
XnThusiast
Posts: 4300
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: converting JPG to PDF

Post by cday »

Please check on the Output tab the Load format settings button, Write tab > PDF for the available compression options.

Are you able to post an example JPEG file?
Ignacev
Posts: 4
Joined: Thu Feb 27, 2025 7:38 am

Re: converting JPG to PDF

Post by Ignacev »

I see several compressiontypes: none, fax, packbits,lzw,zip en for color also jpg. What do I use for best.
cday
XnThusiast
Posts: 4300
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: JPEG to PDF file output file size

Post by cday »

That generally depends on the bit depth (colour mode) of the file loaded, for a colour or grayscale Image JPEG compression is normally most appropriate, and the Quality value selected provides a trade-off between the output image quality and the file size of the image output.

For black and white images Fax compression is normally very effective.
Ignacev
Posts: 4
Joined: Thu Feb 27, 2025 7:38 am

Re: JPEG to PDF file output file size

Post by Ignacev »

Examples
You do not have the required permissions to view the files attached to this post.
cday
XnThusiast
Posts: 4300
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: JPEG to PDF file output file size

Post by cday »

The file size of the lower, colour, image could be minimised by finding the lowest Quality value that results in an output JPEG with acceptable quality.

The first image is black and white, and its file size can probably be considerably reduced by first converting it to black and white and then saving the resulting file with Fax compression.

You could then, if you wish, combine the two files in a two-page PDF, although as for some reason XnConvert doesn't support that, you would need to use XnView MP.
Ignacev
Posts: 4
Joined: Thu Feb 27, 2025 7:38 am

Re: JPEG to PDF file output file size

Post by Ignacev »

To combine I have a little program, specialy made for that. I will test some combinations of compressing. Thank you.
cday
XnThusiast
Posts: 4300
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: JPEG to PDF file output file size

Post by cday »

You might actually be better saving the black and white image as a TIFF with Fax [CCITT G4] compression and using that for the two-file PDF, lossless and probably a smaller file.

Edit: The 24-bit 'black and white' JPEG image's pixel dimensions are too small for the image to convert successfully to a 1-bit black and white image, but saving both files as JPEGs with lower quality values (Q=80 or maybe lower) and then creating a PDF file, should result in a substantially smaller file than your original PDF.