First verifiable PDF/UA image

This commit is contained in:
John Whitington 2024-10-01 14:57:36 +01:00
parent 74ce3f9964
commit ee2feb6d1e
2 changed files with 3 additions and 3 deletions

View File

@ -39,8 +39,8 @@ endif
all : $(TARGETS) all : $(TARGETS)
clean :: clean ::
rm -rf doc foo foo2 out.pdf out2.pdf foo.pdf decomp.pdf *.cmt *.cmti \ rm -rf doc foo foo2 out.pdf out2.pdf out3.pdf foo.pdf decomp.pdf *.cmt \
*.json test/*.pdf *.ps *.aux *.idx *.log *.out *.toc *.cut \ *.cmti *.json test/*.pdf *.ps *.aux *.idx *.log *.out *.toc *.cut \
*.ttf *.ttx out.png *.ttf *.ttx out.png
DOC_FILES = $(foreach x,$(DOC),$(x).mli) DOC_FILES = $(foreach x,$(DOC),$(x).mli)

View File

@ -533,7 +533,7 @@ let image_of_input ?subformat ?title ~process_struct_tree fobj i =
Pdf.Dictionary Pdf.Dictionary
["/XObject", Pdf.Dictionary ["/I0", Pdf.Indirect (Pdf.addobj pdf obj)]]; ["/XObject", Pdf.Dictionary ["/I0", Pdf.Indirect (Pdf.addobj pdf obj)]];
Pdfpage.rotate = Pdfpage.Rotate0; Pdfpage.rotate = Pdfpage.Rotate0;
Pdfpage.rest = Pdf.Dictionary [("/StructTreeParents", Pdf.Integer 1)]} Pdfpage.rest = Pdf.Dictionary [("/StructParents", Pdf.Integer 1)]}
in in
let pdf, pageroot = Pdfpage.add_pagetree [page] pdf in let pdf, pageroot = Pdfpage.add_pagetree [page] pdf in
Pdfpage.add_root pageroot [] pdf Pdfpage.add_root pageroot [] pdf