Hello,
In some WORD templates we have an Advance field {ADVANCE \y nnn,nn}. This field is used to put the text (following the field) in a precise position in the document from the top of the page.
I have tried DOC.UpdateFields(), doc.UdatePageLayout() and many other options and methods for Word and PDF and none gives the result expected.
Some people said that this type of field is not supported since Word2013 version but we are still in Word2003 version. But I tried with Word2013 and this type of field is still supported. It works well in MS-Word2013 application.
When I debug the program and save the document from Aspose into ".doc or .docx" on disk it works very well:
I open the document and the "function ADVANCE" is executed. The result is OK (for Word2003, Word2010 and Word2013).
When I "Save as " that Word document in "PDF format" in MS-Word, it works very well too. All spaces between paragraphs are OK.
But when I save the document in "pdf" format in Aspose (save the document from Memory Aspose Word Document using PDF OPTIONS), the "function ADVANCE" is not executed.
I open the PDF document and the text is not at the right place. It is as if the field ADVANCE does not exist in the document.
Unlike this type of field, the others (IF, SET, CHECKBOX, MERGEFIELD) work very well.
In main environment, we always work in memory - the templates are stored in BLOB on Oracle database, we load them in Aspose.Word.Document and we never save the Word document on disk to avoid the wastes of time for I/O.
To do my tests, I created a document Word2010 on disk and work with this one.
So there is my question:
- Do we have to use a special method to update that type of field or do we have to set a special option for saving the Word document in PDF format ?
To help your investigation, I join the documents that I use to do my tests (the Word2010 document, the PDF document created using Aspose and the PDF document from "Save as" directly from Word). Also, I join the code executed in my last test.
Thank's a lot!