when i save the doc as pdf after merging multiple documents, some of the section’s heading is indented.
and also the table of content is not aligned after saving to pdf.
if i save it as docx its ok.
please help me, my client’s company have a license for the Aspose Words.
We have saved the document (after mail merge DOCX) to PDF using the latest version of Aspose.Words for .NET 19.7 and have not found the shared issue.
You have shared your complete project. Could you please share the simplified code example to reproduce this issue at our end? We will investigate this issue and provide you more information about your query.
the code that i share is the simplified project,
please just take a look of it,
its really simple and easy to understand.
another problem is the background image in the pdf is supposed to fill the whole page,
but its some kinda shifted, so there is a white area on the edge of the page.
its not happening if i save it as docx, its only happening when i save it as pdf.
btw im not using mail merge, im inserting the section’s documents during replace.
here is the tags in the main document that will be replaced by each section’s document:
It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-18906) as ‘Not a Bug’.
Please note that Aspose.Words mimics the behavior of MS Word. If you convert your final DOCX to PDF using MS Word, you will get the same output.
It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-18905) as ‘Not a Bug’.
We suggest you please check the detail of Range.Replace method. Aspose.Words uses metacharcters on find/replace like MS Word.
The AppendLine method produces “CLRF” character. So, please replace following foreach loop in MergeSections method
foreach (var item in data.DocumentDataList)
sectionTags.AppendLine($@"{ReportTag.MergeOpen}{item.ID}{ReportTag.MergeClose}");
With
foreach (var item in data.DocumentDataList)
sectionTags.Append($@"{ReportTag.MergeOpen}{item.ID}{ReportTag.MergeClose}&p");
This will fix the indention problematic with text.