Beginning on routripping of all bookmarks
This commit is contained in:
parent
b6eeb6efaa
commit
c82071546e
3
cpdf.ml
3
cpdf.ml
|
@ -1230,13 +1230,12 @@ let remove_metadata pdf =
|
||||||
(* List bookmarks *)
|
(* List bookmarks *)
|
||||||
let output_string_of_target pdf fastrefnums x =
|
let output_string_of_target pdf fastrefnums x =
|
||||||
match Pdfdest.pdfobject_of_destination x with
|
match Pdfdest.pdfobject_of_destination x with
|
||||||
(*| Pdf.Array [_; Pdf.Name "/Fit"] -> ""*)
|
|
||||||
| Pdf.Array (_::more) ->
|
| Pdf.Array (_::more) ->
|
||||||
let a =
|
let a =
|
||||||
Pdf.Array (Pdf.Integer (Pdfpage.pagenumber_of_target ~fastrefnums pdf x)::more)
|
Pdf.Array (Pdf.Integer (Pdfpage.pagenumber_of_target ~fastrefnums pdf x)::more)
|
||||||
in
|
in
|
||||||
"\"" ^ Pdfwrite.string_of_pdf a ^ "\""
|
"\"" ^ Pdfwrite.string_of_pdf a ^ "\""
|
||||||
| _ -> Printf.eprintf "Warning: could not read target for bookmark\n"; ""
|
| x -> "\"" ^ Pdfwrite.string_of_pdf x ^ "\""
|
||||||
|
|
||||||
(* List the bookmarks, optionally deunicoding the text, in the given range to the given output *)
|
(* List the bookmarks, optionally deunicoding the text, in the given range to the given output *)
|
||||||
let list_bookmarks encoding range pdf output =
|
let list_bookmarks encoding range pdf output =
|
||||||
|
|
Loading…
Reference in New Issue