more
This commit is contained in:
parent
b5ac455fb7
commit
c0f5a0db54
|
@ -3,7 +3,7 @@ let demo = false
|
||||||
let noncomp = false
|
let noncomp = false
|
||||||
let major_version = 2
|
let major_version = 2
|
||||||
let minor_version = 5
|
let minor_version = 5
|
||||||
let version_date = "(devel, 22nd Nov 2021)"
|
let version_date = "(devel, 28th Dec 2021)"
|
||||||
|
|
||||||
open Pdfutil
|
open Pdfutil
|
||||||
open Pdfio
|
open Pdfio
|
||||||
|
|
14
cpdftoc.ml
14
cpdftoc.ml
|
@ -85,10 +85,13 @@ let typeset_table_of_contents ~font ~fontsize ~title ~bookmark pdf =
|
||||||
in
|
in
|
||||||
let toc_pages =
|
let toc_pages =
|
||||||
let title =
|
let title =
|
||||||
flatten
|
let glue = Cpdftype.VGlue {glen = fontsize *. 2.; gstretch = 0.} in
|
||||||
(map
|
if title = "" then [] else
|
||||||
(fun l -> [Cpdftype.Text l; Cpdftype.NewLine])
|
flatten
|
||||||
(split_toc_title (of_utf8 f title)))
|
(map
|
||||||
|
(fun l -> [Cpdftype.Text l; Cpdftype.NewLine])
|
||||||
|
(split_toc_title (of_utf8 f title)))
|
||||||
|
@ [glue]
|
||||||
in
|
in
|
||||||
let lm, rm, tm, bm =
|
let lm, rm, tm, bm =
|
||||||
match firstpage_cropbox with
|
match firstpage_cropbox with
|
||||||
|
@ -98,8 +101,7 @@ let typeset_table_of_contents ~font ~fontsize ~title ~bookmark pdf =
|
||||||
in
|
in
|
||||||
Cpdftype.typeset lm rm tm bm firstpage_papersize pdf
|
Cpdftype.typeset lm rm tm bm firstpage_papersize pdf
|
||||||
([Cpdftype.Font big; Cpdftype.BeginDocument] @ title @
|
([Cpdftype.Font big; Cpdftype.BeginDocument] @ title @
|
||||||
[Cpdftype.VGlue {glen = fontsize *. 2.; gstretch = 0.};
|
[Cpdftype.Font (f, fs)] @ flatten lines)
|
||||||
Cpdftype.Font (f, fs)] @ flatten lines)
|
|
||||||
in
|
in
|
||||||
let toc_pages =
|
let toc_pages =
|
||||||
match firstpage_cropbox with
|
match firstpage_cropbox with
|
||||||
|
|
Loading…
Reference in New Issue