Beginning work on form xobjects squeeze
This commit is contained in:
parent
e94b01605b
commit
ce4efd0bf3
7
cpdf.ml
7
cpdf.ml
|
@ -66,7 +66,7 @@ let really_squeeze pdf =
|
|||
(* For a unknown reason, the output file is much smaller if
|
||||
Pdf.renumber is run twice. This is bizarre, since Pdf.renumber is
|
||||
an old, well-understood function in use for years -- what is
|
||||
going on? *)
|
||||
going on? Furthermore, if we run it 3 times, it gets bigger again! *)
|
||||
pdfr := Pdf.renumber changetable !pdfr;
|
||||
pdfr := Pdf.renumber changetable !pdfr;
|
||||
Pdf.remove_unreferenced !pdfr;
|
||||
|
@ -74,6 +74,11 @@ let really_squeeze pdf =
|
|||
pdf.Pdf.objects <- !pdfr.Pdf.objects;
|
||||
pdf.Pdf.trailerdict <- !pdfr.Pdf.trailerdict
|
||||
|
||||
(* Squeeze the form xobject at objnum. Any resources from the page (or its
|
||||
ancestors in the page tree!) are also needed - we must merge them with the
|
||||
ones from the xobject itself. *)
|
||||
let squeeze_form_xobjects page_resources pdf objnum = ()
|
||||
|
||||
(* For each object in the PDF marked with /Type /Page, for each /Contents
|
||||
indirect reference or array of such, decode and recode that content stream. *)
|
||||
let squeeze_all_content_streams pdf =
|
||||
|
|
Loading…
Reference in New Issue