OK - got it. It's not the Unicode name itself - that's valid. HOWEVER, when you add the second one, it's not properly ordered according to the rules for a Names tree and thus you've created an invalid PDF.
Changing the name just avoids the real, underlying cause. Leonard -----Original Message----- From: Vesa Jääskeläinen [mailto:[email protected]] Sent: Tuesday, September 29, 2009 10:38 AM To: Post all your questions about iText here Subject: Re: [iText-questions] [patch-itextsharp] Fixes to attachment handling Hi All, Ok. I have updated the file on the web: http://nokkau.net/~chaac/files/itextsharp/itextsharp-attachment-problem.zip Now if you open source_with_add_me_added_svn.pdf with Adobe Reader (9.1.3). Attachments pane will be visible and two attachments shown. Now if you select add_me.txt and then right click over it and select Save. Nothing happens. If you select AGM_TimeInfo.log then you are presented with save as dialog. Now if you do the same for my modified iTextSharp version you can save both of those files. (source_with_add_me_added_local.pdf) Thanks, Vesa Jääskeläinen Vesa Jääskeläinen wrote: > Hi, > > Hmm... > > It requires that you add that attachment with iTextSharp. > > But let me undo some local changes that affects generation and also make > one example file with current SVN version. > > Thanks, > Vesa Jääskeläinen > > Leonard Rosenthol wrote: >> I looked at both files in that archive and see no problem with either. >> >> What do you believe is the issue here? >> >> Leonard >> >> -----Original Message----- >> From: Vesa Jääskeläinen [mailto:[email protected]] >> Sent: Monday, September 28, 2009 1:48 PM >> To: Post all your questions about iText here >> Subject: Re: [iText-questions] [patch-itextsharp] Fixes to attachment >> handling >> >> Hi All, >> >> Ok. Now I have file which demonstrates the Unicode problem related to >> attachment object names. >> >> It is available on the following URL: >> http://nokkau.net/~chaac/files/itextsharp/itextsharp-attachment-problem.zip >> >> Observe that Names which contains object names as UTF-16 coded. When >> iTextSharp adds attachment it generates ASCII version of the attachment >> object name. Now if resulting PDF file is opened with Acrobat it cannot >> save the attachments. In the ZIP file there is example what my local >> version of iTextSharp generates. >> >> Thanks, >> Vesa Jääskeläinen >> >> Vesa Jääskeläinen wrote: >>> Hi Paulo, >>> >>> Fair enough. I will send example PDF to you privately. >>> >>> I noticed that PdfName.cs and PdfStream.cs code changes were missing. >>> And then documentation changes in those files and also in >>> PdfSignatureAppearance.cs. Documentation changes are there only because >>> MSVS2005 just complains about broken tags in the javadoc style comments. >>> >>> Any reason why those didn't get in (most importantly those code changes)? >>> >>> Thanks, >>> Vesa Jääskeläinen >>> >>> Paulo Soares wrote: >>>> I've applied your patches except the PdfEncodings one. Unicode detection >>>> must be done in whatever calls PdfEncodings. Please provide a PDF >>>> exhibiting the problem. >>>> >>>> Paulo >>>> >>>>> -----Original Message----- >>>>> From: Vesa Jääskeläinen [mailto:[email protected]] >>>>> Sent: Monday, September 21, 2009 6:39 PM >>>>> To: iText questions >>>>> Subject: [iText-questions] [patch-itextsharp] Fixes to >>>>> attachment handling >>>>> >>>>> Hi All, >>>>> >>>>> Here are some fixes to embedded attachment handling in iTextSharp. >>>>> >>>>> PdfEncodings.cs: Changed behavior of loading attachment object names. >>>>> Might have side effects elsewhere. In my opinion Unicode >>>>> should be used >>>>> internally to process all strings. Raw version can be kept >>>>> handy if needed. >>>>> >>>>> Anyway. This was needed when embedded attachment object name was in >>>>> Unicode and iTextSharp saved new attachment with Ascii version. Now >>>>> Acrobat Reader 9.1 failed to handle files properly. >>>>> >>>>> PdfFileSpecification.cs: Contains bugfixes to wrapper functions. Also >>>>> removes the need to make indirect object for data. Generates >>>>> smaller PDF >>>>> file and smaller catalog. >>>>> >>>>> PdfName.cs: Couple of new tokens. >>>>> >>>>> PdfStamperImp.cs: If attachments were added, it would generate new >>>>> EmbeddedFiles entry in the written PDF file. This fixes it so that >>>>> previous EmbeddedFiles entry is removed. >>>>> >>>>> PdfStream.cs: Keeps track of original attachment size in DL. >>>>> Documentation fixes. >>>>> >>>>> PdfSignatureAppearance.cs: Documentation fixes. >>>>> >>>>> Thanks, >>>>> Vesa Jääskeläinen >>>>> >>>>> >>>> Aviso Legal: >>>> Esta mensagem é destinada exclusivamente ao destinatário. Pode conter >>>> informação confidencial ou legalmente protegida. A incorrecta transmissão >>>> desta mensagem não significa a perca de confidencialidade. Se esta >>>> mensagem for recebida por engano, por favor envie-a de volta para o >>>> remetente e apague-a do seu sistema de imediato. É proibido a qualquer >>>> pessoa que não o destinatário de usar, revelar ou distribuir qualquer >>>> parte desta mensagem. >>>> >>>> Disclaimer: >>>> This message is destined exclusively to the intended receiver. It may >>>> contain confidential or legally protected information. The incorrect >>>> transmission of this message does not mean the loss of its >>>> confidentiality. If this message is received by mistake, please send it >>>> back to the sender and delete it from your system immediately. It is >>>> forbidden to any person who is not the intended receiver to use, >>>> distribute or copy any part of this message. >>>> >>>> ------------------------------------------------------------------------------ >>>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>>> is the only developer event you need to attend this year. Jumpstart your >>>> developing skills, take BlackBerry mobile applications to market and stay >>>> ahead of the curve. Join us from November 9-12, 2009. Register now! >>>> http://p.sf.net/sfu/devconf >>>> _______________________________________________ >>>> iText-questions mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>>> >>>> Buy the iText book: http://www.1t3xt.com/docs/book.php >>>> Check the site with examples before you ask questions: >>>> http://www.1t3xt.info/examples/ >>>> You can also search the keywords list: >>>> http://1t3xt.info/tutorials/keywords/ >>> ------------------------------------------------------------------------------ >>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>> is the only developer event you need to attend this year. Jumpstart your >>> developing skills, take BlackBerry mobile applications to market and stay >>> ahead of the curve. Join us from November 9-12, 2009. Register now! >>> http://p.sf.net/sfu/devconf >>> _______________________________________________ >>> iText-questions mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/itext-questions >>> >>> Buy the iText book: http://www.1t3xt.com/docs/book.php >>> Check the site with examples before you ask questions: >>> http://www.1t3xt.info/examples/ >>> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> iText-questions mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/itext-questions >> >> Buy the iText book: http://www.1t3xt.com/docs/book.php >> Check the site with examples before you ask questions: >> http://www.1t3xt.info/examples/ >> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> iText-questions mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/itext-questions >> >> Buy the iText book: http://www.1t3xt.com/docs/book.php >> Check the site with examples before you ask questions: >> http://www.1t3xt.info/examples/ >> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ > You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
