Simpatie.ro - matrimoniale
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
dannutzza
Femeie
25 ani
Mehedinti
cauta Barbat
25 - 52 ani
Mrrrr's Forum (VIEW ONLY)InregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[PDF] Compress PDF With Text & Scanned PDF with Batch Convert

Pagini: 1 Moderat de TRaP, TonyTzu
pus acum 2 luni#1
TRaP
Moderator
Postari: 969
For this, you need Ghostscript. I got the portable version from here: https://portableapps.com/apps/utilities ... t_portable

The following command has reduced a 35,7 MB text PDF document to a 1,15 MB text PDF document with no visible quality reduction.

"PATH_TO\gswin64c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf original.pdf


For a bigger reduction, you could use:

"PATH_TO\gswin64c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf original.pdf

For me it did the exact same thing as the first command, no further reduction.

The presets are roughly:

Code:

Setting      Compression    Quality

/prepress    Low            Very high
/printer     Moderate       High
/ebook       Good           Good
/screen      High           Lower

Source: ChatGPT


 
   
pus acum 4 zile#2
TRaP
Moderator
Postari: 969
I asked ChatGPT to help me with batch conversions. The following .bat file converts scanned PDFs in folder D:\CommonFiles\pdfs to compressed files in a subfolder named compressed.



@echo off
set "GS=D:\CommonFiles\Ghostscript\bin\gswin64c.exe"
set "INPUT=D:\CommonFiles\pdfs"
set "OUTPUT=D:\CommonFiles\pdfs\compressed"

if not exist "%OUTPUT%" mkdir "%OUTPUT%"

for %%F in ("%INPUT%\*.pdf") do (
    if exist "%%~fF" (
        echo Compressing: %%~nxF
        "%GS%" -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="%OUTPUT%\%%~nF.pdf" "%%~fF"
    )
)

echo.
echo Compression completed.
pause


 
   
Pagini: 1  
Mergi la