Home › Forums › PDF24 Creator › Limit or estimate the size of a PDF created via the command line
- This topic has 4 replies, 3 voices, and was last updated 5 hours, 31 minutes ago by PDF24 Support.
-
AuthorPosts
-
2021-10-06 at 14:20 #60588draspopovParticipant
"C:\Program Files\PDF24\pdf24-DocTool.exe" -join -noProgress -profile "default/good" -outputFile "E:\TEST_PDF\TEST.Pdf" "E:\TEST_PDF\Foto1.JPG" "E:\TEST_PDF\Foto2.JPG"
I create a PDF file via the command line. How to limit the size of the created pdf file? Are there any command line options that allow you to limit the PDF File Size?
2021-10-06 at 14:26 #60589Stefan ZieglerKeymasterYou could use another profile with better/lower DPI and JPG quality option. You can open the profile manager and there you can create custom profiles which you then can use on command line via "user/XXXXX".
2021-10-07 at 06:43 #60592draspopovParticipantVia a command line like "C: \ Program Files \ PDF24 \ pdf24-DocTool.exe" -join -noProgress -profile "default / good" -outputFile "E: \ TEST_PDF \ TEST.Pdf" "E: \ TEST_PDF \ Foto1. JPG "" E: \ TEST_PDF \ Foto2.JPG "
I am creating a pdf file. How can I find out what size the pdf file will be at the output. I can put more ".JPG" files or less in a pdf file. I know the sizes of the ".JPG" files. I have a limit for the PDF file (for example 30MB). How can I understand: How many ".JPG" files can I put in a pdf file?2021-10-07 at 12:37 #64480draspopovParticipantHow do you know how much weight a photo will lose and how much weight to add pdf?
With the Average quality, I put 100 photos of 0.12 mb each and get 20 mb PDF. I put 15 photos of 3 mb each and get 3 mb pdf.
How to guess the size of the PDF file you are creating?2026-10-31 at 22:40 #65806PDF24 SupportModeratorHello,
to answer the second question as well: there is no option that limits the size of the PDF, and the size cannot be calculated in advance.
When the photos are joined with a profile, they are processed again with the image resolution (DPI) and JPEG quality of that profile (default/good: 300 DPI). So the size of the PDF depends on the resolution and content of the photos, not on their file size. That is why your 15 large photos became much smaller, while the 100 small ones did not.
What you can do:
- Use a profile with a lower resolution, e.g.
-profile default/medium(150 DPI) ordefault/low(96 DPI), or your own profileuser/NAMEfrom Manage output profiles in the Toolbox, as described above. - Create the PDF, check its size, and if it is too large, put fewer photos into one file and create several files.
- An existing PDF can be made smaller with
pdf24-DocTool.exe -compressand the options-dpiand-imageQuality: https://creator.pdf24.org/manual/11/#11118-compress-pdf-files
All profile options of the command line: https://creator.pdf24.org/manual/11/#1114-apply-a-profile-to-input-files
This also works online: https://tools.pdf24.org/en/compress-pdf
- Use a profile with a lower resolution, e.g.
-
AuthorPosts
- You must be logged in to reply to this topic.