A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Desktop freeware to SHRINK (aka optimize) PDFs



 
 
Thread Tools Rate Thread Display Modes
  #1  
Old November 14th 19, 12:09 AM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Arlen Holder[_5_]
external usenet poster
 
Posts: 6
Default Desktop freeware to SHRINK (aka optimize) PDFs

Do you know of good desktop freeware to optimize (aka shrink PDF size?

I noticed this old listing accidentally omits pdf shrinking/optimizing:
o Please improve this listing of available freeware PDF functionality
https://groups.google.com/d/msg/alt.comp.freeware/iB5aOor0-Kw/hzoJDDjADQAJ

In an mobile OS thread today, someone asked for shrink/optimize methods
where I pointed that user to our threads on freeware editing & removing
permissions of PDFs.
o PDF Shrinker, by John McWilliams
https://groups.google.com/d/msg/misc.phone.mobile.iphone/9dPChJVDakk/gnjZ1hWTAwAJ

It occurred to me while I was writing up a purposefully helpful response to
that query that I always optimize PDFs (aka shrink PDFs) using the Adobe
Writer (usually version 6 or 7) specific pulldown menu for shrinking PDFs,
which allows us to optimize for any desired version of PDF.

But that's payware.
Since I have the writer, I have never looked for PDF optimizer freeware.

Do you know of good desktop freeware to shrink (aka optimize) PDF size?
--
Usenet is where adults can ask other adults for relevant on-topic advice.
Ads
  #2  
Old November 14th 19, 12:29 AM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Arlen Holder[_5_]
external usenet poster
 
Posts: 6
Default Desktop freeware to SHRINK (aka optimize) PDFs

On Thu, 14 Nov 2019 00:09:19 -0000 (UTC), Arlen Holder wrote:

Do you know of good desktop freeware to shrink (aka optimize) PDF size?


Do you know of good desktop freeware to shrink (aka optimize) PDF size?

I should clarify that a search reveals a ton of "potential" solutions,
just as a search for 'best text editor' would - but - those in the
know would pick "vi" or "notepadd++" right off the bat.

Likewise here with searching for "free pdf shrinker optimizer"
where the results are so cluttered with online-converter and
free-to-download garbage that it's best to ask this group for what
THEY use (since testing all the potential solutions, most of which
will likely be scams, is infeasible).

Hence, if you ALREADY use a free PDF shrinker - that's what I ask for.

Also, it's interesting that Irfanview, with plugins, may be our best
bet if nothing else comes out of this, but Irfanview won't work for
other platforms.

PDF Toolkit may be the best, if platforms are a requirement.

If you're gonna say 'run a search', I'll do that for you just so
you know what garbage pops up (amid the jewels, I'm sure).

o Online PDF shrinkers/optimizers:
http://pdfill.com/document_optimizer.html
https://pdfresizer.com/optimize
https://tools.pdf24.org/en/compress-pdf
https://pdfresizer.com/resize
https://www.pdf2go.com/compress-pdf
https://www.cleverpdf.com/compress-pdf
https://www.sodapdf.com/compress-pdf/

o PDF Toolkit - PDF Optimizer - PDF downsampler
https://www.foxitsoftware.com/blog/pdf-toolkit-pdf-optimizer/

o How to Optimize PDF Files with Free PDF Optimizer Tools
https://pdf.wondershare.com/top-pdf-software/free-pdf-optimizer.html

o How to Compress PDF in Adobe Acrobat Alternative
https://pdf.iskysoft.com/edit-pdf/compress-pdf-in-adobe-acrobat.html

o 8 Best PDF Compressor for Mac and Windows
https://mashtips.com/pdf-compressor-mac-windows/

o 3 Free Offline Bulk PDF Compressor ˇV Optimize And Shrink Large Files
https://www.geckoandfly.com/24313/batch-bulk-pdf-compressor/

o 8 Best Free Software To Compress PDF
https://listoffreeware.com/best-free-software-to-compress-pdf/

o Top 10 PDF Compressor to Reduce your PDF File Size for Free
https://pdf.iskysoft.com/edit-pdf/top-free-pdf-compressor.html

o 5 Easy Ways to Reduce PDF size
https://www.freemake.com/blog/best-software-to-reduce-pdf-file-size/

o PDF Compressors (said to be free - but they may be shills)
https://www.thinstallsoft.com/pdf-compressor-portable/
https://www.pdfcompressor.net/
http://www.tucows.com/preview/1595741/Reduce-PDF-Size

o Compress PDF Files With NXPowerLite
https://www.neuxpower.com/compress-pdf/

o Smallpdf
https://smallpdf.com/

Do you know of good desktop freeware to shrink (aka optimize) PDF size?
(best if it works on all platforms, or at least, one for each.)
  #3  
Old November 14th 19, 01:29 AM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Arlen Holder[_5_]
external usenet poster
 
Posts: 6
Default Desktop freeware to SHRINK (aka optimize) PDFs

On Thu, 14 Nov 2019 00:29:55 -0000 (UTC), Arlen Holder wrote:

I should clarify that a search reveals a ton of "potential" solutions,
just as a search for 'best text editor' would - but - those in the
know would pick "vi" or "notepadd++" right off the bat.


To get good working solutions that EVERYONE can test using their EXISTING
favorite solutions on their particular platform, I provide testcases below.

I ran a quick test of an arbitrary PDF book using the Adobe Acrobat 6
payware and Irvanview freeware on Windows (with the standard PDF-saving
plugins).
(I'm not yet sure what linux software to use so I'll test 1st on Windows.)

1. Original PDF Size = 8,556KB
o Advanced Vehicle Technology.pdf
LONGURL:
http://www.parskhodro.ir/cache/fck_files/file/%D9%85%D9%82%D8%A7%D9%84%D8%A7%D8%AA%20%D8%B9%D9%8 4%D9%85%DB%8C/Advanced%20Vehicle%20Technology.pdf
TINYURL:
https://tinyurl.com/advanced-vehicle-technology
2. Adobe Acrobat Size = 8,475KB (kind of disappointing)
3. Irfanview Size = 8,556KB (very disappointing)

Since that shrinking was disappointing, let's try this book:
A. Original PDF Size = 2,367KB
o Designing Analog Chips, by Hans Camenzind
http://designinganalogchips.com/_count/designinganalogchips.pdf
B. Adobe Acrobat Size = 2,278KB (also kind of disappointing)
C. Irfanview Size = 2,367KB (very disappointing)

Perhaps these books are _already_ highly optimized, where we likely should
start with a better testcase that is overly large for what it is.

Maybe these books that I happen to have on my system?
o Introduction to Programming using Python, by Y Daniel Liang
https://doc.lagout.org/programmation/python/Introduction%20to%20Programming%20using%20Python%2 0%5BLiang%202012-01-12%5D.pdf

o Building Blocks for Theoretical Computer Science, by Margaret M. Fleck
http://mfleck.cs.illinois.edu/building-blocks/version-1.3/whole-book.pdf

o Free to Choose, by Milton Friedman
http://www.proglocode.unam.mx/sites/proglocode.unam.mx/files/docencia/Milton%20y%20Rose%20Friedman%20-%20Free%20to%20Choose.pdf
etc.

--
Since this is a Usenet potluck, the PDFs should also be relevant somehow.
  #4  
Old November 16th 19, 04:09 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Arlen Holder[_5_]
external usenet poster
 
Posts: 6
Default Desktop freeware to SHRINK (aka optimize) PDFs

Here are some suggestions from my log files, where I suggest ImageMagick
first, and GhostScript second.

LOG FILES:
Usually when Adobe Acrobat fails to get a good size, ImageMagick wins:
o convert -density 200x200 -quality 60 -compress jpeg big.pdf small.pdf
o convert -density 200x200 -quality 60 -compress jpeg -resize 50% big.pdf
small.pdf
o convert -compress Zip -density 150x150 big.pdf small.pdf
o http://www.imagemagick.org/script/command-line-options.php#compress

If not, GhostScript works reasonably well on a lot of the PDFs.
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf big.pdf
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen
-dNOPAUSE -dBATCH -dQUIET -sOutputFile=small.pdf big.pdf
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/printer
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf big.pdf
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf big.pdf
o gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4
-dDownsampleColorImages=true -dColorImageResolution=150 -dNOPAUSE -dBATCH
-sOutputFile=small.pdf big.pdf
#!/bin/sh
gs -q -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.3 \
-dPDFSETTINGS=/screen \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-dColorImageDownsampleType=/Bicubic \
-dColorImageResolution=72 \
-dGrayImageDownsampleType=/Bicubic \
-dGrayImageResolution=72 \
-dMonoImageDownsampleType=/Bicubic \
-dMonoImageResolution=72 \
-sOutputFile=out.pdf \
$1

But each PDF is different.

There are LOTs of solutions in my logs that I've done over the years.
o https://github.com/pts/pdfsizeopt
o pdfsizeopt big.pdf small.pdf
o pdftk big.pdf output small.pdf compress
o https://mupdf.com/docs/manual-mutool-convert.html
o https://mupdf.com/docs/manual-mutool-create.html
o http://qpdf.sourceforge.net/
o qpdf --linearize big.pdf small.pdf
o pdf2ps big.pdf huge.ps && ps2pdf huge.ps small.pdf
o ps2pdf -dPDFSETTINGS=/ebook big.pdf small.pdf
o ps2pdf -dPDFSETTINGS=/printer big.pdf small.pdf
o pdf2ps big.pdf huge.ps && ps2pdf -dPDFSETTINGS=/screen
-dDownsampleColorImages=true -dColorImageResolution=200
-dColorImageDownsampleType=/Bicubic huge.ps small.pdf
o ps2pdf -dDownsampleColorImages=true -dDownsampleMonoImages=true
-dDownsampleGrayImages=true -dColorImageResolution=300
-dGrayImageResolution=600 -dMonoImageResolution=1200
o https://www.windows10download.com/4dots-free-pdf-compress/ - stinks
o https://github.com/gugli28/PdfCompressor
o http://www.nicepdf.com/products.html shareware
o https://www.timedicer.co.uk/programs/help/pdf-compress.sh.php
o Open big.pdf in Libre Office; export as pdf; set "jpeg compression
quality" & "image resolution"
o etc.
  #5  
Old November 16th 19, 04:43 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
occam[_6_]
external usenet poster
 
Posts: 54
Default Desktop freeware to SHRINK (aka optimize) PDFs

On 14/11/2019 02:29, Arlen Holder wrote:
1. Original PDF Size = 8,556KB
o Advanced Vehicle Technology.pdf
LONGURL:
http://www.parskhodro.ir/cache/fck_files/file/%D9%85%D9%82%D8%A7%D9%84%D8%A7%D8%AA%20%D8%B9%D9%8 4%D9%85%DB%8C/Advanced%20Vehicle%20Technology.pdf


Using the book above, and FileOptimizer:
https://nikkhokkho.sourceforge.io/st...=FileOptimizer

Original size: 8760476
Final size: 8298233

(Byte sizes are those given by the shrinking s/w.)

P.S File Optimizer, which exists in portable form also (32-bit and x64
versions) not only optimizes pdfs but also images (jpgs, pngs..) and
other file formats. I only use it for pdf-shrinking.
  #6  
Old November 16th 19, 06:16 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Carlos E.R.[_3_]
external usenet poster
 
Posts: 1,356
Default Desktop freeware to SHRINK (aka optimize) PDFs

On 16/11/2019 17.43, occam wrote:
On 14/11/2019 02:29, Arlen Holder wrote:
1. Original PDF Size = 8,556KB
o Advanced Vehicle Technology.pdf
LONGURL:
http://www.parskhodro.ir/cache/fck_files/file/%D9%85%D9%82%D8%A7%D9%84%D8%A7%D8%AA%20%D8%B9%D9%8 4%D9%85%DB%8C/Advanced%20Vehicle%20Technology.pdf


Using the book above, and FileOptimizer:
https://nikkhokkho.sourceforge.io/st...=FileOptimizer

Original size: 8760476
Final size: 8298233

(Byte sizes are those given by the shrinking s/w.)

P.S File Optimizer, which exists in portable form also (32-bit and x64
versions) not only optimizes pdfs but also images (jpgs, pngs..) and
other file formats. I only use it for pdf-shrinking.


Notice that optimizing images may mean reducing their quality, thus
saying that a PDF was optimized does not mean much if the compromises
taken are not listed.


--
Cheers, Carlos.
  #7  
Old November 16th 19, 06:24 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Carlos E.R.[_3_]
external usenet poster
 
Posts: 1,356
Default Desktop freeware to SHRINK (aka optimize) PDFs

On 14/11/2019 01.09, Arlen Holder wrote:
Do you know of good desktop freeware to optimize (aka shrink PDF size?


Optimize is not the same as shrink.

For example, this Linux tool - you posted to a linux group - is an
optimizer which sometimes makes the files 10 times bigger. The goal is
to "optimize" a file that does not work on some tools to work, or work
faster:


PS2PS(1) Ghostscript Tools PS2PS(1)

NAME
ps2ps, eps2eps - Ghostscript PostScript "dis-
tiller"

SYNOPSIS
ps2ps [ options ] input output.ps
eps2eps [ options ] input output.eps

DESCRIPTION
ps2ps uses gs(1) to convert PostScript(tm) or
PDF(tm) file "input" to simpler, normalized and
(usually) faster PostScript in "output.ps". The
output is level 2 DSC 3.0 conforming PostScript.

eps2eps performs the equivalent optimization,
creating Encapsulated PostScript (EPS) files. NB,
despite the name, the input need not be an EPS
file, PostScript or indeed PDF files are equally
acceptable.

Both accept any general Ghostscript command line
options, and options specific to the ps2write and
eps2write devices.


Yeah, I know you asked about pdf. So pdf2ps first.

As to your question, I optimize during creation, not later. If needed, I
gzip the file.

--
Cheers, Carlos.
  #8  
Old November 17th 19, 07:55 AM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
occam[_6_]
external usenet poster
 
Posts: 54
Default Desktop freeware to SHRINK (aka optimize) PDFs

On 16/11/2019 19:16, Carlos E.R. wrote:
On 16/11/2019 17.43, occam wrote:
On 14/11/2019 02:29, Arlen Holder wrote:
1. Original PDF Size = 8,556KB
o Advanced Vehicle Technology.pdf
LONGURL:
http://www.parskhodro.ir/cache/fck_files/file/%D9%85%D9%82%D8%A7%D9%84%D8%A7%D8%AA%20%D8%B9%D9%8 4%D9%85%DB%8C/Advanced%20Vehicle%20Technology.pdf


Using the book above, and FileOptimizer:
https://nikkhokkho.sourceforge.io/st...=FileOptimizer

Original size: 8760476
Final size: 8298233

(Byte sizes are those given by the shrinking s/w.)

P.S File Optimizer, which exists in portable form also (32-bit and x64
versions) not only optimizes pdfs but also images (jpgs, pngs..) and
other file formats. I only use it for pdf-shrinking.


Notice that optimizing images may mean reducing their quality, thus
saying that a PDF was optimized does not mean much if the compromises
taken are not listed.



I quote:
"FileOptimizer is an advanced file optimizer featuring a lossless (no
quality loss) file size reduction that supports: a host of file types"

The file types include images, pdf, etc. If you are worried about
'embedded' images in the pdf, you shoudn't.
  #9  
Old November 17th 19, 08:43 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Arlen _G_ Holder
external usenet poster
 
Posts: 53
Default Desktop freeware to SHRINK (aka optimize) PDFs

On Sat, 16 Nov 2019 17:43:10 +0100, occam wrote:

Using the book above, and FileOptimizer:
https://nikkhokkho.sourceforge.io/st...=FileOptimizer


Thank you occam for the suggestion of the open source "FileOptimizer"
https://sourceforge.net/projects/nikkhokkho/files/FileOptimizer/

I usually attempt to find the canonical location for software, since all my
questions are designed to be useful now & in the future, which, if
sourceforge isn't the canonical location for FileOptimizer software, let us
know, as the work we do together will help everyone, now & in the future
because it's archived in the permanent Usenet record at:
http://tinyurl.com/comp-text-pdf
http://tinyurl.com/alt-comp-freeware
http://tinyurl.com/alt-os-linux
http://alt.comp.os.windows-10.narkive.com

FileOptimizerSetup.exe
"FileOptimizer compresses already compressed files further without
changing the file format, and being totally compatible. It keeps the
behavior of the file untouched, but with its size reduced thanks to several
recompression and optimization techniques."

The number of formats it purports to optimize is astounding!

"FileOptimizer is an advanced file optimizer featuring a lossless (no
quality loss) file size reduction that supports: .3G2, .3GG, .3GP, .7Z, .A,
..AAI, .AC, .ACC, .ADP, .AI, .AIR, .APK, .APNG, .APPX, .APR, .ART, .ART,
..AVI, .AVS, .BAR, .BMP, .BPG, .BPL, .BSZ, .CBT, .CBZ, .CDR, .CDT, .CHI,
..CHM, .CHQ, .CHS, .CHW, .CIN, .CMYK, .CMYKA, .CPL, .CSL, .CSS, .CUR, .DB,
..DB, .DCX, .DDS, .DEB, .DES, .DIB, .DLL, .DOC, .DOCM, .DOCX, .DOT, .DOTM,
..DOTX, .DPX, .DRV, .DWF, .DWFX, .EAR, .EASM, .EML, .EMLX, .EPDF, .EPDF,
..EPRT, .EPUB, .EXE, .FAX, .FAX, .FB2, .FDF, .FITS, .FLA, .FLAC, .FLV, .FPX,
..FPX, .FXG, .FXG, .GALLERY, .GALLERYCOLLECTION, .GALLERYITEM, .GIF, .GRAY,
..GRS, .GZ, .HDR, .HRZ, .HTM, .HTML, .ICB, .ICL, .ICO, .ICO, .INK, .INLINE,
..IPA, .IPK, .IPSW, .ITA, .ITS, .ITZ, .J2C, .J2K, .JAR, .JFI, .JFIF, .JIF,
..JNG, .JP2, .JPC, .JPE, .JPEG, .JPG, .JPS, .JPT, .JS, .JSON, .KML, .KMZ,
..KMZ, .KSF, .LIB, .LIT, .LUA, .LUAC, .LXF, .LZL, .LZMA, .M4A, .M4B, .M4P,
..M4R, .M4V, .MAX, .MBX, .MCE, .MDB, .MDT, .MDZ, .MHT, .MHT, .MHTML, .MHTML,
..MIC, .MIF, .MIFF, .MIX, .MIZ, .MK3D, .MKA, .MKS, .MKV, .MMIP, .MNG, .MONO,
..MOV, .MP3, .MP4, .MPC, .MPD, .MPEG, .MPG, .MPO, .MPP, .MPP, .MPR, .MPT,
..MSC, .MSG, .MSG, .MSI, .MSL, .MSP, .MST, .MSZ, .MTV, .MTW, .MVG, .MVZ,
..MZZ, .NAR, .NBK, .NOTEBOOK, .O, .OBJ, .OCX, .ODB, .ODF, .ODG, .ODP, .ODS,
..ODT, .OEX, .OGA, .OGG, .OGG, .OGV, .OGX, .OGX, .OLE, .OLE2, .ONE, .OPT,
..OSK, .OST, .OTB, .OXPS, .P7, .PALM, .PBM, .PCC, .PCD, .PCDS, .PCL, .PCLS,
..PCX, .PDB, .PDF, .PFM, .PFS, .PGM, .PIC, .PICON, .PICT, .PK3, .PNG, .PNM,
..PNS, .POTM, .POTX, .PPAM, .PPM, .PPS, .PPSM, .PPSX, .PPT, .PPTM, .PPTX,
..PSB, .PSD, .PTIF, .PTIF, .PTIFF, .PTIFF, .PUB, .PUB, .PUZ, .QT, .QWK,
..R2SKIN, .RA, .RAM, .RDB, .RFA, .RFG, .RFT, .RGB, .RGBA, .RLL, .RM,
..RMSKIN, .RMVB, .RTE, .RV, .RVT, .S3Z, .SCR, .SGI, .SGML, .SLDASM, .SLDDRW,
..SLDM, .SLDPRT, .SLDX, .SMIL, .SOU, .SPL, .SPO, .SQLITE, .SQLITE2,
..SQLITE3, .STZ, .SUN, .SVG, .SVGZ, .SWC, .SWF, .SYS, .TAR, .TGA, .TGZ,
..THM, .TIF, .TIFF, .UYVY, .VBX, .VCARD, .VCF, .VDA, .VDX, .VICAR, .VIFF,
..VLT, .VOB, .VSD, .VSS, .VST, .VST, .VSX, .VTX, .WAL, .WAR, .WAV, .WBA,
..WBMP, .WEBA, .WEBM, .WEBP, .WIZ, .WMA, .WMV, .WMZ, .WPS, .WSZ, .X, .XAP,
..XBM, .XHTML, .XHTML, .XL, .XLA, .XLAM, .XLC, .XLM, .XLS, .XLSM, .XLSX,
..XLTM, .XLTX, .XLW, .XML, .XML, .XMZ, .XNK, .XPI, .XPM, .XPS, .XSF, .XSL,
..XSLT, .XSN, .XWD, .YCBR, .YCBRA, .YUB, .Z01, .Z02, .Z03, .Z04, .Z05, .Z06,
..Z07, .Z08, .Z09, .Z10, .ZIP, .ZIPX, .ZX01, .ZX02, .ZX03, .ZX04, .ZX05,
..ZX05, .ZX06, .ZX07, .ZX08, .ZX09, .ZX10, STICKYNOTES.SNT, and THUMBS.DB
file formats among many others."

PS: The question of what is "optimization", has relevancy here.
--
Usenet works great when adults helpfully publicly share items of value.
  #10  
Old November 17th 19, 08:46 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Arlen _G_ Holder
external usenet poster
 
Posts: 53
Default Desktop freeware to SHRINK (aka optimize) PDFs

On Sun, 17 Nov 2019 08:55:15 +0100, occam wrote:

"FileOptimizer is an advanced file optimizer featuring a lossless (no
quality loss) file size reduction that supports: a host of file types"

The file types include images, pdf, etc. If you are worried about
'embedded' images in the pdf, you shoudn't.


Carlos brought up a point that people (not me) distinguish between
o Optimize
o Shrink (reduce size)

OK. I admit ignorance.
I don't know the difference (since I treat them the same).
Since I assume my treating them the same is wrong, does everyone else
already agree what the distinction is between optimize & shrink?

If so, can someone hazard the definition that you all agree on?
  #11  
Old November 17th 19, 09:44 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
p-0''0-h the cat (coder)
external usenet poster
 
Posts: 114
Default Desktop freeware to SHRINK (aka optimize) PDFs

On Sun, 17 Nov 2019 20:46:24 -0000 (UTC), Arlen _G_ Holder
wrote:

On Sun, 17 Nov 2019 08:55:15 +0100, occam wrote:

"FileOptimizer is an advanced file optimizer featuring a lossless (no
quality loss) file size reduction that supports: a host of file types"

The file types include images, pdf, etc. If you are worried about
'embedded' images in the pdf, you shoudn't.


Carlos brought up a point that people (not me) distinguish between
o Optimize
o Shrink (reduce size)

OK. I admit ignorance.
I don't know the difference (since I treat them the same).
Since I assume my treating them the same is wrong, does everyone else
already agree what the distinction is between optimize & shrink?

If so, can someone hazard the definition that you all agree on?


Sure 'Optimize' is a lie. Lossy compression is never optimal. It sucks.
There is only very rarely a good reason to compress pdf's nowadays.
Optimize relies most heavily on extreme jpg compression which in 95%+ of
cases looks horrible. Why do it at all with the kind of bandwidth most
of us have available. Yet the visually illiterate still commit this act.
Don't do it. Don't die dumb. This isn't a practice to encourage. It's
horrid. Before you reply defending this practice thinky real hard. Lossy
compression is for dinosaurs and using the word optimize in this context
is the kind of act of verbal distortion you expect of expedient morally
corrupt two bit point of sales cowboys.

Sent from my iFurryUnderbelly.

--
p-0.0-h the cat

Internet Terrorist, Mass sock puppeteer, Agent provocateur, Gutter rat,
Devil incarnate, Linux user#666, ******* hacker, Resident evil, Monkey Boy,
Certifiable criminal, Spineless cowardly scum, textbook Psychopath,
the SCOURGE, l33t p00h d3 tr0ll, p00h == lam3r, p00h == tr0ll, troll infâme,
the OVERCAT [The BEARPAIR are dead, and we are its murderers], lowlife troll,
shyster [pending approval by STATE_TERROR], cripple, sociopath, kook,
smug prick, smartarse, arsehole, moron, idiot, imbecile, snittish scumbag,
liar, total ******* retard, shill, pooh-seur, scouringerer, jumped up chav,
punk ass dole whore troll, no nothing innumerate religious maniac,
lycanthropic schizotypal lesbian, the most complete ignoid, joker, and furball.

NewsGroups Numbrer One Terrorist

Honorary SHYSTER and FRAUD awarded for services to Haberdashery.
By Appointment to God Frank-Lin.

Signature integrity check
md5 Checksum: be0b2a8c486d83ce7db9a459b26c4896

I mark any message from »Q« the troll as stinky

  #12  
Old November 17th 19, 10:20 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
nospam
external usenet poster
 
Posts: 4,718
Default Desktop freeware to SHRINK (aka optimize) PDFs

In article , Arlen _G_ Holder
wrote:

OK. I admit ignorance.


progress.
  #13  
Old November 18th 19, 08:21 AM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
ken
external usenet poster
 
Posts: 4
Default Desktop freeware to SHRINK (aka optimize) PDFs

In article , lid
says...

For example, this Linux tool - you posted to a linux group - is an
optimizer


No it isn't, Ghostscript makes *no* claim to making files smaller or
'optimizing' them (other than 'optimize for fast web view' in Adobe
terms, which actually makes files bigger).

There can be valid reasons for processing a PDF file to get a new PDF
file; these include colour conversion and production of specific types
of PDF such as PDF/A or PDF/X. Making the file smaller is not, and never
has been, a design goal.


The documentation in VectorDevices.htm tries hard (I wrote it) to make
it clear what process is being undertaken. Whatever the input
(PostScript, PDF, XPS, PCL, PXL, various image formats) Ghostscript
turns the input into a set of marking operations and sends them to the
device. The device then 'processes' those; either it renders to a bitmap
or in the case of the pdfwrite device, its turns those marking
operations into PDF content streams.

The device has no clue at all about what format or language the input
was in and, generally, the interpreter has no idea about what the device
is doing (there are ways it can ask certian things). Teh input and
output are independent of each other.


If you use the specific controls to reduce the quality of images
(DownsampleColorImages, DownsampleGrayImages, DownsampleMonoImages) then
yes, the quality is poorer, because that's what you asked for.

Now the pdfwrite device does have a few tricks for reducing the output
size; certain kinds of object are hashed, and the hash stored. If we
encounter another object of the same kind, with the same hash, we don't
emit a new copy, we just reference the one we already wrote. A sequence
of 4 lines can, under the right conditiona be emitted as a rectangle,
etc etc.

However a well-constructed input PDF file would do exactly the asme, so
in general Ghostscript, given a PDF file as an input, will produce an
output file which is broadly the same size. Cases where the output is
considerably smaller include such things as the creating application
embedding the original application file inside the PDF. In this case the
embedded file would be lost. This *is* a reason to be cautious, other
'metadata' can be omitted as well.

More generally, you will only get a significantly smaller file if you
either reduce the quality or the original input file was created sub-
optimally (for size).


which sometimes makes the files 10 times bigger.


In general that will only happen if you use colour conversion, and
select s lossless compression filter. It is true that this *can* happen
if the input file uses JPEG2000, because patent issues mean we are still
reluctant to embed a JPEG2000 encoder in the open-source version.

I'd argue that it is rare that the *current* version of Ghostscript
would make an output file which is significatnly larger than the input.

If you have a JPEG image in the input and do not either colour convert
or downsample the image data, then it is embedded in the output
unchanged. Obviously if you want to (eg) change an RGB JPEG image to a
CMYK image, the image needs to be decompressed and the amount of image
data will, obviously, be 33% larger before recompression. So yes, the
output file might be larger, especially if you were to choose a lossless
compression scheme.


PS2PS(1) Ghostscript Tools PS2PS(1)


This isn't 'Ghostscript' its 'Ghostscript Tools'. Notice the man page
points out that these 'use' Ghostscript.


Yeah, I know you asked about pdf. So pdf2ps first.


OMG NO!

Do *not* convert a PDF file to PostScript just so you can send the
resulting file through Ghostscript to get a PDF file. If you do that you
will very negatively impact the quality, as well as making the output
PDF file larger.

First point; don't use the scripts, use Ghostscript directly.

Secondly, the names of these scripts are historical and no longer
reflect (if they ever did) the true functionality. Any of them will take
*either* PostScirpt or PDF as an input.

So you can use 'ps2pdf' and supply a PDF file as the input, it does not
have to be a PostScript file.

I'm being pedantic here because I often have to help people who have no
idea how Ghostscript works, don't (or can't) read the documentation and
when asked how they came up with a workflow or command line answer
'Google'.

So this is to make clear what purpose Ghostscript is actually intended
for, and that you don't want to do PDF-PS-PDF just do PDF-PDF, should
anyone come across this thread while Googling......


Ken
  #14  
Old November 18th 19, 07:33 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Carlos E.R.[_3_]
external usenet poster
 
Posts: 1,356
Default Desktop freeware to SHRINK (aka optimize) PDFs

On 17/11/2019 21.46, Arlen _G_ Holder wrote:
On Sun, 17 Nov 2019 08:55:15 +0100, occam wrote:

"FileOptimizer is an advanced file optimizer featuring a lossless (no
quality loss) file size reduction that supports: a host of file types"

The file types include images, pdf, etc. If you are worried about
'embedded' images in the pdf, you shoudn't.


Carlos brought up a point that people (not me) distinguish between
o Optimize
o Shrink (reduce size)

OK. I admit ignorance.
I don't know the difference (since I treat them the same).
Since I assume my treating them the same is wrong, does everyone else
already agree what the distinction is between optimize & shrink?


Are you familiar with compilers? Like GCC. If you search for "optimize"
you'll see that you can optimize for size or for speed - mutually
exclusive. And then there are many other subtle variations of
"optimize", like do this but not that.

Well, it is the same thing, you have to define what is your personal
goal "optimizing" PDFs - and both are of interest depending on the case.

You may want to reduce size, but not touching images, or yes but up to a
limit. Just an example.

Or you may want to replace usage of fonts like "Times New Roman" to
plain "Times" - because this allow removal of the font definition from
the file and instead use the PDF viever definition of that font. I have
done this in text mostly PDFs which "optimized" from a few hundred
kilobytes to just a few kilobytes.

This particular optimization I would like to find a program in Linux to
do it, because I lost my method: Libre Office has removed support for
printer fonts, which allowed this trick.


--
Cheers, Carlos.
  #15  
Old November 18th 19, 07:49 PM posted to comp.text.pdf,alt.comp.freeware,alt.comp.os.windows-10,alt.os.linux
Carlos E.R.[_3_]
external usenet poster
 
Posts: 1,356
Default Desktop freeware to SHRINK (aka optimize) PDFs

On 18/11/2019 09.21, ken wrote:
In article , lid
says...

For example, this Linux tool - you posted to a linux group - is an
optimizer


No it isn't, Ghostscript makes *no* claim to making files smaller or
'optimizing' them (other than 'optimize for fast web view' in Adobe
terms, which actually makes files bigger).


I was talking of "ps2ps".


There can be valid reasons for processing a PDF file to get a new PDF
file; these include colour conversion and production of specific types
of PDF such as PDF/A or PDF/X. Making the file smaller is not, and never
has been, a design goal.


The documentation in VectorDevices.htm tries hard (I wrote it) to make
it clear what process is being undertaken. Whatever the input
(PostScript, PDF, XPS, PCL, PXL, various image formats) Ghostscript
turns the input into a set of marking operations and sends them to the
device. The device then 'processes' those; either it renders to a bitmap
or in the case of the pdfwrite device, its turns those marking
operations into PDF content streams.

The device has no clue at all about what format or language the input
was in and, generally, the interpreter has no idea about what the device
is doing (there are ways it can ask certian things). Teh input and
output are independent of each other.


If you use the specific controls to reduce the quality of images
(DownsampleColorImages, DownsampleGrayImages, DownsampleMonoImages) then
yes, the quality is poorer, because that's what you asked for.


Not the case with ps2ps :-)


Now the pdfwrite device does have a few tricks for reducing the output
size; certain kinds of object are hashed, and the hash stored. If we
encounter another object of the same kind, with the same hash, we don't
emit a new copy, we just reference the one we already wrote. A sequence
of 4 lines can, under the right conditiona be emitted as a rectangle,
etc etc.

However a well-constructed input PDF file would do exactly the asme, so
in general Ghostscript, given a PDF file as an input, will produce an
output file which is broadly the same size. Cases where the output is
considerably smaller include such things as the creating application
embedding the original application file inside the PDF. In this case the
embedded file would be lost. This *is* a reason to be cautious, other
'metadata' can be omitted as well.

More generally, you will only get a significantly smaller file if you
either reduce the quality or the original input file was created sub-
optimally (for size).


I understand ps2ps uses certain constructs that while rendering the same
"image" are larger and faster. In their words, "normalized" ps.



which sometimes makes the files 10 times bigger.


In general that will only happen if you use colour conversion, and
select s lossless compression filter. It is true that this *can* happen
if the input file uses JPEG2000, because patent issues mean we are still
reluctant to embed a JPEG2000 encoder in the open-source version.

I'd argue that it is rare that the *current* version of Ghostscript
would make an output file which is significatnly larger than the input.


Well, I would have to retest the files in which I first observed this a
decade ago :-D


If you have a JPEG image in the input and do not either colour convert
or downsample the image data, then it is embedded in the output
unchanged. Obviously if you want to (eg) change an RGB JPEG image to a
CMYK image, the image needs to be decompressed and the amount of image
data will, obviously, be 33% larger before recompression. So yes, the
output file might be larger, especially if you were to choose a lossless
compression scheme.


PS2PS(1) Ghostscript Tools PS2PS(1)


This isn't 'Ghostscript' its 'Ghostscript Tools'. Notice the man page
points out that these 'use' Ghostscript.


I don't think I said the contrary?



Yeah, I know you asked about pdf. So pdf2ps first.


OMG NO!

Do *not* convert a PDF file to PostScript just so you can send the
resulting file through Ghostscript to get a PDF file. If you do that you
will very negatively impact the quality, as well as making the output
PDF file larger.


I don't think the quality should be impacted :-?

I have done it occasionally and not noticed anything. Why? I don't
remember, it could have been done to extract a few pages. Size, yes, I
know it changes a lot.

I do things like extract odd/even pages for printing, and as my printer
understand ps but not pdf, my output format needs to be ps.


First point; don't use the scripts, use Ghostscript directly.


For that, /I/ would have to know the exact concoction to mimic the
script while using Ghostscript directly, and I don't.


Secondly, the names of these scripts are historical and no longer
reflect (if they ever did) the true functionality. Any of them will take
*either* PostScirpt or PDF as an input.


Ah, good to know they admit PDF as input.


So you can use 'ps2pdf' and supply a PDF file as the input, it does not
have to be a PostScript file.


Interesting!


I'm being pedantic here because I often have to help people who have no
idea how Ghostscript works, don't (or can't) read the documentation and
when asked how they came up with a workflow or command line answer
'Google'.

So this is to make clear what purpose Ghostscript is actually intended
for, and that you don't want to do PDF-PS-PDF just do PDF-PDF, should
anyone come across this thread while Googling......



--
Cheers, Carlos.
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 07:26 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.