We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word to PDF Conversion : text does not start at the right place

Hello,
When I convert Word files to pdf using Aspose, the text in the pdf file does not start at the right place.

The input file (.doc format) contains some text areas that are positionned at the top then some text (see attached file Doc_original.png)

The output file (in PDF) is almost the same but some text is not placed correctly (see attached file PDF_converti.png)

However, when the conversion is done without the license, the piece of text used to indicate the copyright seems to put my text back on track (see attached file PDF_converti_sans_lic.png).

My questions :
- is it a bug ?
- I tried to add spaces to the converted document (with license) in order to put the text allright but could not manage to do so. Do you have an idea as to how I could manage this ?

Hi Julien,

Thanks for your inquiry. Please also attach your input Word document and output PDF file with incorrect results here for testing. We will investigate the issue on our end and provide you more information.

Best regards,

Hi Awais,

Here are the files.

Best regards,

Hi Julien,

Thanks for your inquiry. Aspose.Words uses true type fonts during rendering document to fixed page formats such as PDF. Your document uses fonts ‘BC3of92’ and ‘France’; please zip these fonts and attach them as well for testing. We will investigate the issue on our end and provide you more information.

Best regards,

Hello,

I attached the Bc3of92.ttf file in a zip (it is the font used to create the barcode).

But I do not know where to find the France font that you talked about (it isnt in my Windows/Font folder).

Hi Julien,

Thanks for your inquiry. I tested the scenario and have managed to reproduce the same problem. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11124. We will further look into the details of this problem and keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Hi Awais,

First of all, thanks for the quick answer.

Concerning the second part of my question, do you know if there is a way to artificially reproduce what I get when I convert my document without the license ? In short how can I add some text in my document to “move” the Object text at the right place ?

Maybe I need to ask in another part of the forum ?

Best regards,

Hi Julien,

Thanks for your inquiry. You can apply for a free 30-days evaluation license. Please refer to the following article:
https://docs.aspose.com/words/java/licensing/

Best regards,

Sorry, I think there was a misunderstanding in he way I asked the question.

I already have a license. But when I use it to convert my documents, the text is not at the right place.

So I would like to add some text in the converted document using aspose to put it back at the right place (which is what happens when I convert my doc without the license. cf screen capture number 3).

Do you know of a way to achieve that ?

Best regards,

Hi Julien,

Thanks for your inquiry. Well, you can use the techniques mentioned in the following article to insert content in document:
https://docs.aspose.com/words/java/use-documentbuilder-to-insert-document-elements/

Rest assured, we will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

Hi Awais,

Do you have any idea if the resolution is more likely to be in a few weeks or a few months ?

Thus I will see if I need to look into an alternate way to convert my documents.

Best regards

Hi Julien,

Thanks for your inquiry. Regarding WORDSNET-11124, our development team has completed the work on your issue and has come to a conclusion that they won’t be able to implement the fix to your issue. Your issue (WORDSNET-11124) will be closed with ‘Won’t Fix’ resolution. You can set the wrapping type of the problematic frame (" Caluire, le 11 Février 2014 ") to None as a workaround. We apologize for any inconvenience.

Best regards,

Hi Awais,
It is disappointing but I understand your decision.
Concerning the workaround, would you have a link to an example or documentation showing me how to do it ?

Best regards,

Hi Julien,

Thanks for your inquiry. Unfortunately, currently text frames are not fully supported by Aspose.Words and you can not change “Text Wrapping” setting for Frames by using Aspose.Words. Please manually set the text wrapping of frame using MS Word.

We already logged this feature request as WORDSNET-9294 in our issue tracking system. You will be notified via this forum thread once this feature is available. We apologize for your inconvenience.

Moreover, I am quoting the developers comments about WORDSNET-11124 here for your reference.

*The issue occurs because Aspose.Words does not reproduce some peculiarities in MS Word behaviour observed in compatibility mode.

In the attached simplified document, there are two frames. The first frame ends with a table. The table ends with a row that has no borders. There is not enough vertical space for the text to be placed between the frames. However, there is some space to the right of the second frame. Aspose.Words puts the wrapped text there. MS Word doesn’t.
Why MS Word does not use the space to the right of the second frame, is not clear. If a border is specified for the last table row in the first frame, MS Word uses this space. The only difference between the attached simple.docx and simple.border.docx is a border around the last table row in the first frame. Yet MS Word uses the space to the right of the second frame in simple.border.docx and does not use it in simple.docx.

If the document is re-saved without maintaining compatibility via MS Word, the space to the right of the second frame is also used.

When experimenting, I met with even more peculiar behaviour of MS Word in simple.duplicated paragraph.docx. In this document, the paragraph before the second frame (“Magic paragraph”) is rendered twice in MS Word. It is rather weird that when one of them is edited in MS Word, the text in the second one changes as well. The issue is preserved in print preview, but looks differently on exporting from MS Word to Pdf.

So the whole thing looks like an area where MS Word logic is strange and fuzzy, at least. With duplicated paragraph, it seems that there is a bug in MS Word somewhere in this area.*