Dear ,
I have a dynamic word document and I’ll merge it with a dynamic pdf file
after merged the content of the pdf file is corrupted
var doc = new Document(steamDoc);
ImportFormatOptions options = new ImportFormatOptions { KeepSourceNumbering = true };
DocumentsHelper.RemoveTableOfContents(doc, 0);
Aspose.Words.DocumentBuilder _builder = new Aspose.Words.DocumentBuilder(finalDocument);
if (i == 1) _builder.MoveToBookmark("attachment");
if (i > 1) _builder.MoveToBookmark(attachmentBookMarkName);
if (i != 0)
{
_builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading3;
_builder.Writeln(file.DocumentName);
_builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.BodyText3;
_builder.InsertBreak(BreakType.LineBreak);
}
finalDocument.AppendDocument(doc, ImportFormatMode.UseDestinationStyles, options);
MemoryStream outputStream = new MemoryStream();
finalDocument.Save(outputStream, SaveFormat.Pdf);
Currpted_2.png (95.0 KB)
Currpted1.png (64.0 KB)
Sampel_1.png (50.8 KB)
sampel2_1.png (82.2 KB)
Please advice