mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-04-26 15:58:45 +02:00
Xobjects were being processed multiple times in squeeze
This commit is contained in:
parent
8ae103ade7
commit
214e3c3fa2
@ -89,10 +89,12 @@ the page tree!) are also needed - we must merge them with the ones from the
|
||||
xobject itself. However, it it safe for now -- in the unlikely event that the
|
||||
resources actually need to be available, the parse will fail, the squeeze of
|
||||
this object will fail, and we bail out. *)
|
||||
(* FIXME: XObjects inside xobjects? *)
|
||||
let xobjects_done = ref []
|
||||
|
||||
let squeeze_form_xobject pdf objnum =
|
||||
if mem objnum !xobjects_done then () else
|
||||
begin
|
||||
xobjects_done := objnum :: !xobjects_done;
|
||||
let obj = Pdf.lookup_obj pdf objnum in
|
||||
match Pdf.lookup_direct pdf "/Subtype" obj with
|
||||
@ -118,6 +120,7 @@ let squeeze_form_xobject pdf objnum =
|
||||
| _ -> failwith "squeeze_form_xobject"
|
||||
end
|
||||
| _ -> ()
|
||||
end
|
||||
|
||||
(* For a list of indirects representing content streams, make sure that none of
|
||||
them are duplicated in the PDF. This indicates sharing, which parsing and
|
||||
|
Loading…
x
Reference in New Issue
Block a user