Announcement

Collapse
No announcement yet.

Bolstering Compression Rate (Batch Script, Irfanview + PDFPlugin)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bolstering Compression Rate (Batch Script, Irfanview + PDFPlugin)

    Hello,

    I am using Irfanview to compile a series of images inside a folder into a PDF. I am using the multiPDF function. After doing multiple tests, its compression rate is not great. PDFs file sizes are large, where I would want something on the same compression rate as when you use Microsoft Print to PDF. Below is my script.

    SET exePDF="%ProgramFiles%\IrfanView\i_view64.exe"
    SET dllPDF="%ProgramFiles%\IrfanView\Plugins\PDF.dll"
    SET currDIR="%CD%"

    echo =====PROCESS A: Compile pictures folder(s) into PDF

    REM Checks for existence of Irfanview and PDF plugin on local computer

    IF NOT EXIST %exePDF% GOTO NOIRF
    IF NOT EXIST %dllPDF% GOTO NOIRFP

    echo Compiling...
    REM locate all images in each subfolder and package them into a PDF, and rename the PDF as the folder's name where it was located

    for /D %%G in ("%~dp0*") do @%exePDF% /multipdf=("%~dp0%%~nG.pdf","%%G\*.jpg","%%G\*.jpeg ","%%G\*.bmp","%%G\*.png","%%G\*.tiff","%%G\*.tif" ,"%%G\*.avif","%%G\*.gif","%%G\*.jfif") /resample /cmdexit
    I may need help, as I feel like I'm missing something. I scoured the documentation for options, but is there a function via Irfanview that can take the photos from the folders that its searching and compress them into a single PDF, but yet at the same time have the same compression style/rate as Microsoft Print to PDF? Or, perhaps there is a way to do the same thing but invoke Microsoft Print to PDF?

    Thank you very much.

    #2
    I see this option in the PDF Plugin:

    Click image for larger version

Name:	JPG Quality.png
Views:	144
Size:	16.3 KB
ID:	96120
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      Originally posted by Bhikkhu Pesala View Post
      I see this option in the PDF Plugin:

      Click image for larger version

Name:	JPG Quality.png
Views:	144
Size:	16.3 KB
ID:	96120
      Thanks for this! I didn't realize the settings would port while using the script.

      To follow up: Regarding Microsoft Print to PDF. When you print using this method the pictures blow up to the size of a page which aids in its compression method. Can this be done in Irfanview as well?

      Comment


        #4
        The size of the PDF can be changed on the Layout tab of the PDF Settings dialog.
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          Where are the options for the PDF plugin?

          I get this:

          Click image for larger version

Name:	Capture_20221031-133613.jpg
Views:	188
Size:	91.8 KB
ID:	96131

          Comment


            #6
            Originally posted by IrfanUserGuyxyx View Post
            Where are the options for the PDF plugin?
            You can see them when you go to save a PDF file, or create a multipage image and save it as a PDF.
            Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

            Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

            Comment

            Working...
            X