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

PDF not displaying all characters

Hi,

I have code to create a PDF from a word document, adding an image at the top of the page. However, I noticed it is not displaying any apostrophe (') characters, instead replacing them with a blank space. I have stepped through the code several times, and the apostrophes are definitely present in the string that is passed into the PDF creation method. I cannot work out why they do not get displayed on the actual PDF.
I have attached my code as well as the Word Doc I have been using, any help gratefully appreciated!

Mat

Mat.Test.WinApp0.zip

4 Replies

AD Administrator Syncfusion Team November 24, 2006 07:46 PM UTC

Hi Mat,

We do have support for display the text with apostrophe. I tried testing the sample to display the text with apostrophe it is working fine. Could you please refer the following sample it will fulfill your needs.

Here is the sample for your reference.
DocToPdf.zip

Could you please take a look at this and let me if the problem still exists.

Regards,
Prakash


AD Administrator Syncfusion Team November 27, 2006 09:27 AM UTC

Hi Prakash,

thanks for your reply.
I have checked the sample, and the apostrophe's appear correctly. However, I checked my app again, and they still do not appear. I hard-coded a string with lots of apostrophes in it and added to te PDF creation process, which works fine. But the apostrophe's in the Word document I am loading into the PDF, still do not appear.

Mat


AD Administrator Syncfusion Team November 27, 2006 12:45 PM UTC

Hi again, I'm not sure how clear I had been about what I need (and am trying) to do. I need to create a Windows app that allows the user to select a Word document and an image file, to create a PDF report from. The image is the company logo, the Word document contains the report contents.
The sample you sent me displays the Word document fine, including the apostrophe's that caused the original problem. However, I cannot add any sections to the PDFDocument after loading the XML version of the Word document into it. This means I cannot attach the image, and the whole point of the app is that the image will not be part of the Word document. I tried merging two PDF documents, one containing the image, the other containing the Word doc content, but it assigned one page to the image, and another to the text content. Is there any way of changing this? Or, preferably, any way of adding sections to the PDFLogicDocument after I have opened the XML version of the word document using
PDFLogicDocument myPDF = new PDFLogicDocument();
myPDF.OpenXml("DocToPDF.xml");

Thanks, Mat


AD Administrator Syncfusion Team November 28, 2006 04:25 PM UTC

Hi Mat,

I have created the sample with select the contents from the word file and add the image at the top of the document. In my sample, first I have created two separate PDF documents that is
one with image file and another one with word document file.

Then I am adding template of first document and then overlap the first document with the second document’s template.

Could you please refer the following program.
Overlap.zip

Could you please take a look at this and let me know if the problem still exists.

Regards,
Prakash.


Loader.
Live Chat Icon For mobile
Up arrow icon