I have a simple test using .NET Core where I read in a PDF, set all text fields to "foo", and save it back to the file system:
public void Test_ValidPdfInput_ProducesInvalidPdfOutput()
using (var stream = File.Open("D:\\temp\\fw4.pdf", FileMode.Open, FileAccess.Read, FileShare.Read))
using (var pdf = new PdfLoadedDocument(stream, true))
using (var f = System.IO.File.OpenWrite("D:\\temp\\output.pdf"))
foreach (PdfLoadedField field in pdf.Form.Fields)
var textField = field as PdfLoadedTextBoxField;
if (textField != null)
textField.Text = "foo";
When I try to open the output PDF in Adobe Acrobat Reader DC, I get the following error:
"This document enabled extended features in Adobe Acrobat Reader. The document has been changed since it was created and use of extended features is no longer available. Please contact the author for the original version of this document."
None of the "foo" values appear and none of the fields are even displayed on the document where they should be.
However, when I open the PDF using Google Chrome Version 57.0.2987.133 (64-bit) it renders perfectly with all fields visible, editable, and with the expected "foo" value in them.
For reference, here are the packages in my csproj:
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
<PackageReference Include="Syncfusion.Pdf.Portable" Version="15.2120.0.40" />
Attached is a zip contianing the input PDF, and a sample output PDF from the code above.
Am I doing something incorrect, or is there a potential bug in Syncfusion.Pdf.Portable? Any help is appreciated.