mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-01-28 01:09:36 +01:00
Newly-created files get IDs by default
This commit is contained in:
parent
6bc3ada2b2
commit
7b1dadf776
@ -5,11 +5,15 @@ let blank_document width height pages =
|
||||
map (fun () -> Pdfpage.blankpage (Pdfpaper.make Pdfunits.PdfPoint width height)) (many () pages)
|
||||
in
|
||||
let pdf, pageroot = Pdfpage.add_pagetree pdf_pages (Pdf.empty ()) in
|
||||
Pdfpage.add_root pageroot [] pdf
|
||||
let pdf = Pdfpage.add_root pageroot [] pdf in
|
||||
Pdf.change_id pdf (string_of_float (Random.float 1.));
|
||||
pdf
|
||||
|
||||
let blank_document_paper papersize pages =
|
||||
let pdf_pages =
|
||||
map (fun () -> Pdfpage.blankpage papersize) (many () pages)
|
||||
in
|
||||
let pdf, pageroot = Pdfpage.add_pagetree pdf_pages (Pdf.empty ()) in
|
||||
Pdfpage.add_root pageroot [] pdf
|
||||
let pdf = Pdfpage.add_root pageroot [] pdf in
|
||||
Pdf.change_id pdf (string_of_float (Random.float 1.));
|
||||
pdf
|
||||
|
Loading…
x
Reference in New Issue
Block a user