From dda96864a6fe995f2cb2a012a2a6f8fb4011f4ec Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 20 Oct 2022 15:06:49 +0100 Subject: [PATCH] more --- cpdftexttopdf.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cpdftexttopdf.ml b/cpdftexttopdf.ml index 49de789..0ae65e8 100644 --- a/cpdftexttopdf.ml +++ b/cpdftexttopdf.ml @@ -15,7 +15,7 @@ let rec of_utf8_with_newlines fontpack fontsize t = (fun u -> match Cpdfembed.get_char fontpack u with | Some (c, n, f) -> - Printf.printf "Charcode %i, font number %i\n" c n; + (*Printf.printf "Charcode %i, font number %i\n" c n;*) begin if n <> !currfont then begin if !currtext <> [] then items := Cpdftype.Text (rev !currtext)::!items; @@ -65,7 +65,9 @@ let typeset ~papersize ~font ~fontsize text = 72. (Pdfpaper.unit papersize) (Pdfunits.PdfPoint) (Pdfpaper.width papersize) /. 15. in let instrs = [Cpdftype.Font (font, fontsize); Cpdftype.BeginDocument] @ instrs in - Printf.printf "to_string: %s\n" (Cpdftype.to_string instrs); + (*Printf.printf "to_string: %s\n" (Cpdftype.to_string instrs);*) let pages = Cpdftype.typeset margin margin margin margin papersize pdf instrs in let pdf, pageroot = Pdfpage.add_pagetree pages pdf in - Pdfpage.add_root pageroot [] pdf + let pdf = Pdfpage.add_root pageroot [] pdf in + (*Pdfwrite.debug_whole_pdf pdf;*) + pdf