Issue with Textbox when converting word2010 document to PDF

While converting the document to PDF we are losing all the text within our textbox on a word 2010 document.

I am working on an upgrade to update all our word templates to 2010 which are currently in word 2007. With Aspose for Words .NET 11.0 we have no issues with documents in word 2007 but if we update to word 2010 it eats up the textbox with everything in it. I have so far tried 15.12 and 16.3 versions with no success.

Other than that we have an issue converting a mergefield into a barcode font(C39N2_3.TTF), it is keep printing it as a text when converts to PDF. With Words .NET 11.0 this is not an issue, but with 15.12 and 16.3 regardless of the MS word version(2007/2010).

Any help will be greatly appreciated.

Thanks
Yasir

Hi Yasir,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word documents
  • Please attach the output Pdf files that show the undesired behavior.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Thank you Tahir for your response.

I have attached the zip which contains the information you have requested.
Our application that creates the letters is part windows application and part WCF service. In the zip file I have provided you with the part of WCF service which uses the Aspose words to convert the documents. In this I am using 13.5 Aspose version. I have tried everything upto 13.5, starting at 11.0, including 15.12, 16.3 and 15.3 with no success.

I hope with the given information you can resolve the issue, let me know if more info required.

Thanks
Yasir

Hi Yasir,

Thanks for sharing the detail.
yxsultan@arkbluecross.com:
if we update to word 2010 it eats up the textbox with everything in it.
Could you please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing? Please also share the screenshots of problematic document.
yxsultan@arkbluecross.com:
Other than that we have an issue converting a mergefield into a barcode font(C39N2_3.TTF), it is keep printing it as a text when converts to PDF. With Words .NET 11.0 this is not an issue, but with 15.12 and 16.3 regardless of the MS word version(2007/2010).
We also need your input and output documents along with simple application to reproduce this issue at our end.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

did you not get the attachment from my earlier response. It has everything you asked for.

-Yasir

Hi Yasir,

Thanks for sharing the detail. We checked the shared documents and code and noticed that you joining the documents in method (CombineDocs) and performing mail merge operation. In RequestGenerator.Init, you are converting Invoice.docx to Pdf. Unfortunately, we have not found the code which perform mail merge and have not found Invoice.docx in the shared zip file.

Please create a simplified standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing. You may share the code which calls WCF service. We will investigate the issue on our side and provide you more information.

Attached please find the .zip with the requested information.
Letters parts had Invoice.docx document.

Hope this will help.

Regards
-Yasir

Hi Yasir,

Unfortunately, we are unable to execute your shared application. We have not found the code which perform mail merge. Moreover, LetterParts folder contains many documents. Could you please share which documents you want to merge? Please share the code snippet which calls of CombineDocs method.

It would be great if you please create a simplified standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end.

To ensure a timely and accurate response please supply us with the above information, if you cannot supply us with this information we will not be able to investigate your issue and raise a ticket.

Dear Tahir,

1. WordFiller.cs does the mail merge, it is under the service application.
2. Combine docs is a method of TemplateManager.vb, this class exists under Wcf application which is part of the ReqGenService
3. You can pickup any combination of Header,Content and Footer to create one letter. A letter can only have one header or footer but can have more than one content part.
4. The source code I shared with you is error free except that it has connections to our shared locations and DB servers which I cannot do anything about.

Please feel free to let me know if the given information is enough or not, this is the maximum I can do.

Thanks
Yasir

Hi Yasir,

Unfortunately, we have not found the Aspose.Words code which perform mail merge in WordFiller.cs. However, we have created a simple console application for your scenario. Please check the attached application, input and output documents. This application joins the documents (Header001.docx, 005c.docx and Footer001.docx) and perform mail merge using the shared xml (110000_2260493_01232014115759417.041416083421.xml).

Please check the attached output document (Out.pdf). We have not found the shared issue in output pdf. Please use latest version of Aspose.Words for .NET 16.3.0 and let us know if you have any more queries.

Thank you Tahir.
I will look at the application.

The mail merge part gets taken taken care by the WordFiller project within the ReqGenSvc solution. FormFiller.cs within the project have the mail merge piece of code not WordFiller.cs, sorry gave you the wrong filename.

Regards
Yasir

Hi Yasir,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

Hello Tahir,
Issue with the textbox has been addressed. Now the barcode issue needs to be addressed.

I am attaching an app which fills the word doc and then creates the word document. I have added the code to covert to PDF using aspose.words 16.3. It is losing the barcode font when it converts the document to PDF. I am using a 3 of 9 barcode font.

Please see the attached zip with the console app, Header001.docx(test template) and a folder ‘testdocs’ which shows the output in word and pdf forms.

Please let me know if you have any questions.

Thanks
Yasir

Hi Yasir,

Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts on the machine where you're converting documents to Pdf. Please refer to the following articles:


If you still face problem, please embed the fonts inside your input document (letter_2804201656202313.docx) and share it here for testing? We will investigate the issue on our side and provide you more information. To embed a TrueType font in a saved document in Microsoft Office Word 2013, follow these steps:

  • First, select the File option from the Word ribbon at the top of the screen.
  • From the options bar on the left-hand side, choose Options.
  • A Word Options window will come up. Select the Save option from the banner on the left-hand side.
  • Under Preserve fidelity when sharing this document select the check box next to Embed fonts in the file. Then click OK.

Tahir thankyou for your response. I will look into the solution you suggested but there are few things I want to make clear, probably I was not able to communicate earlier.

First the template I have is in Word 2010 not 2013, if that is an issue please let me know.

Secondly, I have font installed and as mentioned in my earlier responses I can create the document fine on my machine if it is a 2007 docx.

I have spent quite a bit before reaching out to ASPOSE, I can be wrong but I think the issue is with aspose.words and the application module I sent you in the response before this clearly proves it.

Also, if I use the functionality within the created word document to save it as a PDF it does it with the BarCode printing fine with no issues.

I am attaching the screen shots that I have font installed and it is of True Type also PDF that was converted by MS word PDF converter.

Regards
Yasir

Attached please find the zip with word and PDF.
I have created the
PDF from the Aspose 16.3 while word has the font, after making the
changes suggested by you, the PDF still printing the text.

Regards
Yasir

Hi Yasir,

Thanks for sharing the document. Unfortunately, we have not found the embedded font in the shared document. Please check the attached image for detail. We have checked the shared document in MS Word 2010.

Could you please share here the font 'BC C39 2 to 1 Narrow' for testing? We will install this font at our side and investigate this issue. Thanks for your cooperation.

Tahir,
Attached please find the zip folder with the font.
Thanks for all the help.

Hi Yasir,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13481. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello Tahir,
Would like to know if you have any update(s) on the issue.

Thanks
Yasir