We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

XmlException error on PDF generation

I am getting the following error :

System.Xml.XmlException: Invalid character in the given encoding

This is happening when I am trying to make a form field value contain a single qoute or double qoute or special characters such as •. How am I suppose to take care of these items? Add an escape character or do I need to replace them with something else.

Thanks

Chad

3 Replies

DK Dhivya K Syncfusion Team January 18, 2007 02:08 PM UTC

Hi Chad,

I am afraid. I am unable to reproduce the issue.We can make a form field value contain a single quote or double quote or special characters.
Here is a sample for your reference:
FillForm.zip

Here is a sample PDF generated:
http://www.syncfusion.com/Support/user/uploads/Modified_7d295dc5.pdf

Please take a look into it and let me know if you have any other queries.
Could you please provide me your sample PDF form in which you are trying to insert text with special characters?This will help me investigating further on this issue.

Regards,
Dhivya.


CD Chad Dunham January 18, 2007 09:27 PM UTC

Dhivya

Thanks for your response. I have attached a PDF document and a sample webpage that will produce the error. If you need any clearification of the code, please ask.

Thanks

Chad


>Hi Chad,

I am afraid. I am unable to reproduce the issue.We can make a form field value contain a single quote or double quote or special characters.
Here is a sample for your reference:
FillForm.zip

Here is a sample PDF generated:
http://www.syncfusion.com/Support/user/uploads/Modified_7d295dc5.pdf

Please take a look into it and let me know if you have any other queries.
Could you please provide me your sample PDF form in which you are trying to insert text with special characters?This will help me investigating further on this issue.

Regards,
Dhivya.

FTL.zip


DK Dhivya K Syncfusion Team January 19, 2007 12:49 PM UTC

Hi Chad,

Thanks again for the sample.

Regarding special characters in the form, When I tried running my sample[that I provided you in my previous post] in web application, it works fine. The problem is with the PDF document that you are trying to fill the values.
It doesn't allow even to enter simple string in the fields.Also, all the fields are filled in already with some text. It doesn't throws me any exception, but it corrupts the document after filling the field. Could you please verify that this is the document you are getting XML exception?
Here is a sample created with your document:
FillForm.zip
Could you please take a look into the sample and confirm me if this is the sample PDF you have mentioned about? This will help me investigating further on this issue.

Regards,
Dhivya.

Loader.
Live Chat Icon For mobile
Up arrow icon