Limit or estimate the size of a PDF created via the command line

Home › Forums › PDF24 Creator › Limit or estimate the size of a PDF created via the command line

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #60588
    draspopov
    Participant

    "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?

    #60589
    Stefan Ziegler
    Keymaster

    You 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".

    #60592
    draspopov
    Participant

    Via 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?

    #64480
    draspopov
    Participant

    How 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?

    #65806
    PDF24 Support
    Moderator

    Hello,

    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) or default/low (96 DPI), or your own profile user/NAME from 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 -compress and the options -dpi and -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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.