Hello Team,
We are trying to edit pdf with one simple text, however the final output is not with proper layout.
Please find attached Test.pdf and the output file TestOutput.pdf. We have just wrote one line on top and the output file is not same as the original one.
testoutput.pdf (162.2 KB)
test.pdf (84.3 KB)
Please find below code.
string sourceFile = "test.pdf";
Aspose.Words.Document doc = new Aspose.Words.Document(sourceFile);
var builder2 = new DocumentBuilder(doc);
// Insert text at the beginning of the document.
builder2.MoveToDocumentStart();
builder2.Write("Morbi enim nunc faucibus a.");
doc.UpdatePageLayout();
doc.Save("testoutput.pdf"), Aspose.Words.SaveFormat.Pdf);
Thanks
Hardik