> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Bruno Lowagie > Sent: Thursday, May 25, 2006 7:28 AM > To: [email protected] > Subject: Re: [iText-questions] Problem with long PdfName objects > > Filipe Fedalto wrote: > > > Therefore, I have two questions regarding these subjects: > > > > 1) What does PDF Viewers (namely acrobat reader and acrobat > standard) > > do when they face these longer-than-allowed names? Do they ignore > > them? Do they truncate them into 127 characters? Fact is that they > > open my documents. > > I don't know. I think different viewer will treat them differently. > > > 2) Considering that I am unable to change the way my clients create > > their PDF Documents, and that I must process them using iText, what > > could I do? Should I edit PdfName class to suit my special needs? > > Should PdfName class proceed with long names the same way those > > viewers do (ignoring, truncating or accepting them) instead of just > > throwing an Exception? > > Maybe we should subclass PdfName and override the constructor. > Then use this subclass in PdfReader only (not for PDF creation). > > Or we could add an extra constructor to PdfName with a dummy field, > and use this constructor in PdfReader only. > > I think that's better than just changing the current constructor that > makes sure the names are created in conformance with the PDF > Reference.
I think it's better to remove the length check altogether. Not even Acrobat 4.0 complains about it and if Acrobat is ready to create it and to accept it I don't see why we should be more strict. Paulo 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. ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
