mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-03-10 00:20:06 +01:00
New font strategy for 10_001
This commit is contained in:
parent
ef9efc8406
commit
ac9f965ac9
@ -268,7 +268,7 @@ let list_font pdf page (name, dict) =
|
|||||||
| Some (Pdf.Name n) -> Pdfwrite.string_of_pdf (Pdf.Name n)
|
| Some (Pdf.Name n) -> Pdfwrite.string_of_pdf (Pdf.Name n)
|
||||||
| _ -> ""
|
| _ -> ""
|
||||||
in
|
in
|
||||||
(page, name, subtype, basefont, encoding, Pdf.Null)
|
(page, name, subtype, basefont, encoding, Pdf.direct pdf dict)
|
||||||
|
|
||||||
(* List the fonts used in an xobject, and in any of the xobjects it has. Do not
|
(* List the fonts used in an xobject, and in any of the xobjects it has. Do not
|
||||||
process an xobject twice. *)
|
process an xobject twice. *)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
(** Print font list to stdout *)
|
(** Print font list to stdout *)
|
||||||
val print_fonts : ?json:bool -> Pdf.t -> int list -> unit
|
val print_fonts : ?json:bool -> Pdf.t -> int list -> unit
|
||||||
|
|
||||||
(** Return font list. Page number, name, subtype, basefont, encoding. *)
|
(** Return font list. Page number, name, subtype, basefont, encoding, font (direct). *)
|
||||||
val list_fonts : Pdf.t -> int list -> (int * string * string * string * string * Pdf.pdfobject) list
|
val list_fonts : Pdf.t -> int list -> (int * string * string * string * string * Pdf.pdfobject) list
|
||||||
|
|
||||||
(** Return font list in JSON format *)
|
(** Return font list in JSON format *)
|
||||||
|
@ -468,7 +468,7 @@ let matterhorn_10_001 _ _ pdf =
|
|||||||
if not (List.for_all (mem' allowed_names) names) then merror ()
|
if not (List.for_all (mem' allowed_names) names) then merror ()
|
||||||
in
|
in
|
||||||
let check_font font =
|
let check_font font =
|
||||||
Printf.printf "Check font: %s\n" (Pdfwrite.string_of_pdf font);
|
(*Printf.printf "Check font: %s\n" (Pdfwrite.string_of_pdf font);*)
|
||||||
match Pdf.lookup_direct pdf "/ToUnicode" font with
|
match Pdf.lookup_direct pdf "/ToUnicode" font with
|
||||||
| Some _ -> (* a) *) ()
|
| Some _ -> (* a) *) ()
|
||||||
| _ ->
|
| _ ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user