more
This commit is contained in:
parent
ece1e9f280
commit
ebc40c8ee4
|
@ -202,9 +202,14 @@ let rec json_of_object pdf fcs no_stream_data = function
|
||||||
| _ -> ())
|
| _ -> ())
|
||||||
elts;
|
elts;
|
||||||
`Assoc (map (fun (k, v) -> (k, json_of_object pdf fcs no_stream_data v)) elts)
|
`Assoc (map (fun (k, v) -> (k, json_of_object pdf fcs no_stream_data v)) elts)
|
||||||
| P.Stream ({contents = (P.Dictionary dict, stream)} as mut) as thestream ->
|
| P.Stream ({contents = (P.Dictionary dict as d, stream)} as mut) as thestream ->
|
||||||
P.getstream thestream;
|
P.getstream thestream;
|
||||||
let str =
|
let str =
|
||||||
|
match P.lookup_direct pdf "/FunctionType" d with
|
||||||
|
| Some _ ->
|
||||||
|
Pdfcodec.decode_pdfstream_until_unknown pdf thestream;
|
||||||
|
begin match !mut with (_, P.Got b) -> Pdfio.string_of_bytes b | _ -> error "/FunctionType: failure: decomp" end
|
||||||
|
| None ->
|
||||||
if no_stream_data then "<<stream data elided>>" else
|
if no_stream_data then "<<stream data elided>>" else
|
||||||
match !mut with (_, P.Got b) -> Pdfio.string_of_bytes b | _ -> error "failure: toget"
|
match !mut with (_, P.Got b) -> Pdfio.string_of_bytes b | _ -> error "failure: toget"
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in New Issue