>From the renameField() documentation:

Renames a field. Only the last part of the name can be renamed. For example, if 
the original field is "ab.cd.ef" only the "ef" part can be renamed. 

Paulo
  ----- Original Message ----- 
  From: Paul Ryan 
  To: [email protected] 
  Sent: Friday, November 26, 2010 6:04 PM
  Subject: [iText-questions] problem with renamefield method


  I have a PDF document that has several hundred fields. All of the field names 
have periods in them, such as "page1.line1.something"

  I want to remove these periods and replace them with either an underscore or 
(better) nothing at all

  There appears to be a bug in the itextsharp libraries where the renamefield 
method does not work if the field has a period, so the following does not work 
(always returns false)

Dim formfields As AcroFields = stamper.AcroFields
Dim renametest As Boolean
renametest = formfields.RenameField("page1.line1.something", 
"page1_line1_something")
If the field does not have a period in it, it works fine.

  Has anyone come across this and is there a workaround or a better way of 
doing it?

DISCLAIMER

Step Up Software Limited is registered in England and Wales. Registered office 
Crowthorne Enterprise Centre, Old Wokingham Road, Crowthorne, Berkshire, RG45 
6AW. Company Number 07145650.

This email is intended for the addressee only and may contain information that 
is privileged and confidential. If you are not the intended recipient, you must 
not copy, distribute or take any action in reliance on it. If this email has 
been sent to you in error, please notify us immediately by telephone. 

Outbound emails are scanned for viruses but the company does not certify that 
emails are free of viruses or defects.

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
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

Reply via email to