pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colette Joubarne <cjouba...@privacyanalytics.ca>
Subject Unable to mark document as tagged
Date Fri, 13 Jun 2014 12:21:06 GMT
I have a tagged pdf doc with the following header:

            /Type/Catalog/Pages 2 0 R/Lang(en-CA) /StructTreeRoot 10 0 R/MarkInfo<</Marked

I read in the contents, replace some of the text and create a new doc. I copy the document
information from the original doc and set marked to true.

            newDoc = new PDDocument();

            PDMarkInfo markinfo = new PDMarkInfo();

and when I check that it was set, it returns true:

      PDMarkInfo markInfo = PTConstants.pdfDoc.getDocumentCatalog().getMarkInfo();
      if ((markInfo != null) && (markInfo.isMarked())) System.out.println("true");

But, while the resulting document displays correctly, the header indicates that it is not

/Type /Catalog
/Version /1.4
/Pages 2 0 R
/MarkInfo 3 0 R

Any idea what is going on?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message