unidoc / unipdf-cli

CLI for PDF processing using unipdf
Other
111 stars 16 forks source link

Compression ratio 0.19% #40

Open sanderjson opened 4 years ago

sanderjson commented 4 years ago

Hello I am trying to compress a pdf from the unicli. Everything appears to be working however the compression is negligible (0.19%). This pdf does contain some large images - so I am not sure if there is something wrong with my command.

The watermark does show up as expected on each page.

$ ./unipdf optimize /path/to/myLargeFile.pdf -q 75 -P 100
Optimizing /path/to/myLargeFile.pdf
Unlicensed copy of unidoc
To get rid of the watermark - Please get a license on https://unidoc.io
Original: /path/to/myLargeFile.pdf
Original size: 211795879 bytes
Optimized: /path/to/myLargeFile_optimized.pdf
Optimized size: 212193033 bytes
Compression ratio: -0.19%
Processing time: 2957.33 ms
Status: success
----------
gunnsth commented 4 years ago

@sanderjson Can you share the PDF file so we can check? Also might be worth updating the unipdf for the repository to latest version.

gunnsth commented 4 years ago

@sanderjson We have updated unipdf-cli to newest unipdf. Can you try again? And we do need the file in order to debug this.

sanderjson commented 4 years ago

yes I can update and try again, if the issue persists I can link this file later this evening

On Tue, Mar 31, 2020 at 2:04 PM Gunnsteinn Hall notifications@github.com wrote:

@sanderjson https://github.com/sanderjson We have updated unipdf-cli to newest unipdf. Can you try again? And we do need the file in order to debug this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/unidoc/unipdf-cli/issues/40#issuecomment-606845556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE53FAPKTCLRQNGKOXWL3HDRKJEDPANCNFSM4LVWLU2Q .

sanderjson commented 4 years ago

ok I have downloaded the latest version and I have tried optimizing a few different files with similar results. One pdf I tried to opimize resulted in 0.18% through the unipdf-cli but when I dropped it into a compressor website (https://pdfcompressor.com/) it reduced by 98%.

This document for example link compressed ~ 6% with the unipdf-cli but 31% with the online compressor.

Could this be due to an error in my installation?

gunnsth commented 1 year ago

@sanderjson We need access to the uncompressed input file in order to investigate that. Sorry about the late reply. Was just going through some old issues and seems like this had not been followed up on.

sanderjson commented 11 months ago

Thank you for following up, feel free to close.