This may be a bug in iText.
I think the PdfTemplate's XObj should have the StructParents entry, not
the page, but it's added to the first page.
When combining direct content manipulation with Document functions, you
have to be Very Careful in various places, and this is clearly one of
them.
Both templates are created from the DirectContent while that direct
content is pointed at the first page. That's not a big deal, BUT:
Beginning marked content sequences tags the CURRENT PAGE with a
StructParents entry, not the one the template is added to later.
Furthermore, if a template is used on multiple pages, the MCIDs and
StructParents entries could easily be entangled. This would require a
change in iText to fix. If you're just using each template on a single
page, no problem. If not... problem.
IIRC, its A Bad Thing to reuse your paragraph structure element the way
you are. I believe the /T entry should contain the text of the marked
content, not a description of the tag type... Nope, not quite.
According to the PDF spec, The T should be a specific title ("Chapter 1"
vs "Chapter"). /ActualText was the key I was thinking of... which is
also Good To Have.
--Mark Storer
Senior Software Engineer
Cardiff.com
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
> -----Original Message-----
> From: asamaj [mailto:[email protected]]
> Sent: Thursday, February 03, 2011 5:42 AM
> To: [email protected]
> Subject: Re: [iText-questions] Document structure and marked
> content usingtemplates
>
>
> I send the resulting PDF
> http://itext-general.2136553.n4.nabble.com/file/n3258109/IText
Templates.pdf
> ITextTemplates.pdf
> --
> View this message in context:
> http://itext-general.2136553.n4.nabble.com/Document-structure-
> and-marked-content-using-templates-tp3237661p3258109.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
> --------------------------------------------------------------
> ----------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even
> better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer
> expires February 28th, so secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> 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
>
>
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
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