Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Jan 02, 2015 8:39 am

We build a up test-project using "Free Spire.Doc for .Net" (v5.2.12). After having used in during development and test, we recently bought "Spire.Doc". I'm using the lastest version of "Spire.Doc for .Net" (v5.3.11).

I than ran into some problems in our project. I've been able to reproduce this issue with the code below

I've written the following program:
Code: Select all
public static string TemplateName = "test.docx";
public static string OutputDocx = "testOut.DOCX";
public static string OutputPdf = "testOut.pdf";

public void TestFormFields()
{
   byte[] template = File.ReadAllBytes(TemplateName);
   Document document = new Document(new MemoryStream(template));

   for (int i = 0; i < document.Sections.Count; i++)
   {
      foreach (FormField field in document.Sections[i].Body.FormFields)
      {
         field.Text = "IsThisTextVisible";
      }
   }

   document.SaveToFile(OutputDocx, FileFormat.Docx);

   ToPdfParameterList toPdf = new ToPdfParameterList();
   if (document.BuiltinDocumentProperties.Company == null)// Spire.Doc crashes when this property = null
   {
      document.BuiltinDocumentProperties.Company = "";
   }
   document.SaveToFile(OutputPdf, toPdf);
}


When I open the generated "testOut.docx", all formfields are correctly visible and show the text "IsThisTextVisible".
However, when I open the "testOut.pdf", all formfields show up empty.

If you have any more question about this problem, please let me know.

Kind regards,

Marcel

MarcelEmpirion
 
Posts: 1
Joined: Fri Jan 02, 2015 8:26 am

Fri Jan 02, 2015 9:09 am

Dear MarcelEmpirion,

Thanks for your inquiry.

I have reproduced this issue and posted it to our dev team, we will inform you if there is any update.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Wed Jan 28, 2015 7:37 am

Dear MarcelEmpirion,

Sorry to keep you waiting.

We just released a new version of Spire.Doc (Spire.Doc v5.3.38) to fix this problem, please download it via link below and have a try:
http://www.e-iceblue.com/Download/downl ... t-now.html
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.Doc