Bruno,

Thanks for your help,  you are absolutely right : my problem was not solved 
using PdfAWriter even after adding setTagged().

As you suggested I went back to PdfCopy adding "keepTaggedPdfStructure" set to 
true to getImportedPage(). The nullPointerException is gone and it seems 
(better to be prudent …) that it is ok now.

Thanks again both of you for helping me.

As you understood I'm new to Itext and PDF structure, and I was feeling a bit 
lost …

Loïc


De : Bruno Lowagie [mailto:br...@lowagie.com]
Envoyé : vendredi 1 mars 2013 11:23
À : itext-questions@lists.sourceforge.net
Objet : Re: [iText-questions] Itext 5.4.0 - Splitting pdf / UA

Op 28/02/2013 11:20, loic schreef:

Thank you very much, my problem is solved thanks to your reply. :-)

I don't agree.
You may have the illusion that your problem is solved, but in reality you're 
probably doing it wrong.



First I have try to use PdfCopy, but I got a nullPointerException when

closing document.

Did you use the correct version of getImportedPage()?
You need the version that takes a boolean value "keepTaggedPdfStructure" and 
that value needs to be set to true.



Then I tried just adding setTagged() with PdfAWriter and it works fine.

I'm 99% sure that the structure tree is wrong. If the structure tree is 
correct, the iText developers have done a really amazing job. I know they do a 
good job, but allowing the preservation of structure in imported pages when 
using PdfAWriter wasn't on the technical roadmap. If they managed to do this, 
they deserve extra compliments.
best regards,
Bruno
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
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