Note about Cpdfsqueeze.recompress

This commit is contained in:
John Whitington 2024-12-19 13:38:24 +00:00
parent 7dbc1b44b2
commit 89099e8683
2 changed files with 9 additions and 3 deletions

View File

@ -3,8 +3,8 @@ let demo = false
let agpl = true let agpl = true
let major_version = 2 let major_version = 2
let minor_version = 8 let minor_version = 8
let minor_minor_version = 0 let minor_minor_version = 1
let version_date = "(10th December 2024)" let version_date = "(devel, 19th December 2024)"
open Pdfutil open Pdfutil
open Pdfio open Pdfio

View File

@ -11,7 +11,13 @@ open Pdfio
flush stdout; flush stdout;
close_in fh*) close_in fh*)
(* Recompress anything which isn't compressed, unless it's metadata. *) (* Recompress anything which isn't compressed (or compressed with old-fashioned
mechanisms), unless it's metadata. *)
(* TODO The use of this function in cpdfcommand.ml actually takes some power
away from the user - maybe they don't want old-fashioned stuff
re-compressed, but only uncompressed data compressed. Consider adding a flag
-recompress-only-uncompressed and an argument to this function. *)
let recompress_stream pdf = function let recompress_stream pdf = function
(* If there is no compression, or bad compression with /FlateDecode *) (* If there is no compression, or bad compression with /FlateDecode *)
| Pdf.Stream {contents = (dict, _)} as stream -> | Pdf.Stream {contents = (dict, _)} as stream ->