Hi,
I think this is more of my misunderstanding. I'm basically writing the tags
myself including a <Document> tag to the root. I wish to have full control
over what tags to write and what tags not to write. I had problems with the
default auto generated tags. As much as I can remember, the logical reading
order of the PDF not being quite right and the tagging not passing
accessibility checks in Adobe.
I'm now left with a PDF with 2 <Document> tags. 1 of which is auto generated
by iText and one which is defined by me in code. I do use the Role = null to
stop tags being set. But I'm left with a root document tag with a bunch of
path:path (etc) tags. Maybe I don't understand how to achieve what I need.
Defining the logical reading order would be good because this sometimes doesn't
quite work in particular scenarios.
Tim
________________________________
From: iText Info <i...@1t3xt.info>
To: Jones Tim <timjone...@yahoo.co.uk>; Post all your questions about iText
here <itext-questions@lists.sourceforge.net>
Sent: Wednesday, 2 October 2013, 17:01
Subject: Re: [iText-questions] PDF tagging document tag
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