Hi,
I´m evaluating the library and after browsing it in the object browser, I'm really eager to make some tests. I tried PdfContentEditor ReplaceText but got an exception when saving the result.
After minimizing the code to the following, I still get the exception:
Dim pdfEditor As New PdfContentEditor
pdfEditor.BindPdf(pdfFile)
pdfEditor.Save(Server.MapPath("Templates/result3.pdf"))
The exception message:
[IOException: Invalid pdf format:pdf head signature is not found!] ....
Aspose.Pdf.Kit.PdfContentEditor.Save(Stream outputStream) +65
Aspose.Pdf.Kit.PdfContentEditor.Save(String outputFile) +58 ... |
So, just to test that my setup is correct, I altered the code to use PdfPageEditor as follows:
Dim pdfEditor As New PdfPageEditor
pdfEditor.BindPdf(pdfFile)
pdfEditor.Save(Server.MapPath("Templates/result3.pdf"))
This code works fine and generates an output pdf, identical to the input file with the evaluation info added.