pts / pdfsizeopt

PDF file size optimizer
GNU General Public License v2.0
764 stars 66 forks source link

option to keep XMP stream without filter #112

Open galaxy001 opened 5 years ago

galaxy001 commented 5 years ago

There is a Perl script exiftool, which can read the meta information of different files including PDF. However, it does not support FlateDecode Predictor 2 now.

Since there is only one XMP meta for a pdf file, it is acceptable to keep it less compressed.

I hope there are option to skip XMP stream. Or use a filter that exiftool can read.

pts commented 5 years ago

Thank you for suggesting this workaround feature! This should be easy to implement. Please attach a small example PDF with XMP matadata to the issue.

Please note that this is a limitation of exiftool, because exiftool is not able to read a valid PDF. Please report this bug to the exiftool authors.

galaxy001 commented 5 years ago

We can use this file: exorr.pdf

XMP Toolkit                     : Adobe XMP Core 5.6-c015 84.159810, 2016/09/10-02:41:30
Metadata Date                   : 2019:03:21 15:09:42+08:00
Creator Tool                    : PScript5.dll Version 5.2
Format                          : application/pdf