Margins being moved

Old Aspose Version 13 keeps the margin:

Newer version causes the text to shift up:

The word document has the correct margin before it is converted to pdf:

this is the code we use to convert to pdf that is causing the margin to shift upwards now:

var wordDebugFile = _tempFileService.CachePath + lwDoc.DocId + ".Docx";
doc.Save(wordDebugFile, SaveFormat.Docx);
 

var options = new PdfSaveOptions
{
    //EmbedFullFonts = true,
    //UseCoreFonts = false,
    PreserveFormFields = true,
    SaveFormat = SaveFormat.Pdf,
    Compliance = PdfCompliance.Pdf17, // or PdfA1a for archival
    //ExportDocumentStructure = true
};
 
 
doc.Save(lwDoc.TempFileName, options);

@bribiesca Could you please attach your input and output documents here for testing? We will check the issue and provide you more information. Unfortunately, it is impossible to analyze the problem using screenshots without real documents.

v0szfvj5.khb.pdf (114.3 KB)

9072.Docx (26.8 KB)

Here you go

@bribiesca
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-28358

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Can you get sales to contact me about paid support.

@bribiesca You can contact our sales team in Aspose.Purchase forum.

@bribiesca The issue occurs because ADVANCE field is not supported by Aspose.Words layout engine. There is an ADVANCE field affecting the paragraph position. ADVANCE field handling is not implemented in Aspose.Words layout. ADVANCE field support is unlikely to be implemented in the foreseeable future. Also, /y field switch used in the document is deprecated by MS Word since Word 2013. As the source .docx appears to be generated by Aspose.Words, you might have control over the document. In that case a workaround can be recommended to remove the problematic field and position the paragraph by using paragraph “space before” property.

Just throwing this out there, anyway we could pay for ADVANCE support? It used to work in older versions.

@bribiesca Since the ADVANCE \y field switch has been depreciated in Word 2013, this is a complex task and it is not easy to implement such things, so even if you get paid support in this case, it does not guarantee that this feauture will be implemented faster. Sorry for the inconvenience caused.