Use new CamlPDF option to avoid pointless compression
This commit is contained in:
parent
58122d8bae
commit
adeb7c6c33
1
Changes
1
Changes
|
@ -25,6 +25,7 @@ Fixes:
|
||||||
o Added opam file in-source
|
o Added opam file in-source
|
||||||
o Fixed -set-annotations with page links
|
o Fixed -set-annotations with page links
|
||||||
o Allow Exif JPEGs as well as JFIF ones in -jpeg and -draw-jpeg
|
o Allow Exif JPEGs as well as JFIF ones in -jpeg and -draw-jpeg
|
||||||
|
o Only compress a stream if it actually makes it smaller
|
||||||
|
|
||||||
2.6.1 (September 2023)
|
2.6.1 (September 2023)
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ and remove_images_page onlyremove boxes pdf page =
|
||||||
{page with
|
{page with
|
||||||
Pdfpage.content =
|
Pdfpage.content =
|
||||||
(let stream = Pdfops.stream_of_ops content' in
|
(let stream = Pdfops.stream_of_ops content' in
|
||||||
Pdfcodec.encode_pdfstream pdf Pdfcodec.Flate stream;
|
Pdfcodec.encode_pdfstream ~only_if_smaller:true pdf Pdfcodec.Flate stream;
|
||||||
[stream]);
|
[stream]);
|
||||||
Pdfpage.resources = resources'}, pdf
|
Pdfpage.resources = resources'}, pdf
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ let recompress_stream pdf = function
|
||||||
with
|
with
|
||||||
| _, Some (Pdf.Name "/Metadata") -> ()
|
| _, Some (Pdf.Name "/Metadata") -> ()
|
||||||
| (None | Some (Pdf.Array [])), _ ->
|
| (None | Some (Pdf.Array [])), _ ->
|
||||||
Pdfcodec.encode_pdfstream pdf Pdfcodec.Flate stream
|
Pdfcodec.encode_pdfstream ~only_if_smaller:true pdf Pdfcodec.Flate stream
|
||||||
| _ -> ()
|
| _ -> ()
|
||||||
end
|
end
|
||||||
| _ -> assert false
|
| _ -> assert false
|
||||||
|
|
Loading…
Reference in New Issue