Op 19/09/2013 16:46, Jones Tim schreef:
> Please could we have functionality to set the tagging of the document 
> at the very basic level of setting user properties and creating the 
> default root structure of the document and NOT to create the 
> "<Document>" tag and it's other tags. 

Adding the <Document> tag to the document is really important. It's 
being added not only as a root to the structure tree, but to the page 
content of every page as well. Without having <Document> as a root 
element you can't have a proper PDF/UA document. That's why we have 
decided to add the <Document> tag as root element by default.

It's not trivial to localize the method which adds this tag:
- part of the job is done on opening the document,
- part is done on opening and closing pages,
- the rest is done on closing document.
As you can see: it's not as simple as one would think.

Unfortunately, it's not possible now to tell iText to "skip writing the 
root element". You could use a workaround in some cases. For instance, 
you could redefine the document role. Let's say you could call 
Document.setRole(PdfName.DIV), then the <Document> tag would be replaced 
with <Div> tag in both structure tree and page content

For the next release, we can add an option which allows to skip writing 
certain tags. Currently it's possible to call Document.setRole(null). It 
means that <Document> tag will not be written. But in this case all 
internal tags will not be written as well. I think we can extend this 
functionality a bit so that a certain tag is not written, but all 
internal tags are written.

Also I have a question what do you want to achieve with redefining 
<Document> tag? What extra functionality do you need? Maybe we can 
advise you something or push this functionality into next release.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to