Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Jul 20, 2018 11:56 pm

Hi, I am new to Spire.PDF for .NET. I am working on a proof of concept to utilize the library in my solution. In doing so, I've uncovered a couple of items that seem like bugs to me so I've created a console application to demonstrate the issues I'm seeing.

Bug #1) When setting the Text property of a PdfTextBoxFieldWidget object, the value is not visible in the PDF file that is rendered unless you also change the name of the field to some other value.

Bug #2) In attempting to work around bug #1, I discovered that you cannot change the name value of a field with the SetName() method and then set it back to its original value. An exception is thrown from the library.

I have seen a few other bugs but I wanted to see if these issues get addressed or if there's an issue with my code before documenting and submitting them.

I like the simplicity of the library but I'm not finding it as reliable as I'd expect.

ccochran
 
Posts: 1
Joined: Fri Oct 28, 2016 12:28 am

Mon Jul 23, 2018 6:02 am

Dear ccochran,

Thanks for your inquiry.
1. If I use Adobe Reader to open the result file, the filled text is visible, but there will be a hint the document has been changed because the PDF enables Adobe Reader extensions. But if I open the result file via Adobe Acrobat, the text is not visible. I have posted this issue to our Dev team.
2. I have reproduced the issue and also transferred it to our Dev team.

We will let you know once there is any news towards your issues. Sorry for the inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Nov 12, 2018 8:48 pm

I'm seeing similar issues with a build I just downloaded today (Nov 12, 2018). Has this been fixed?

Here is part of my code. At this point I've already opened a PDF file that contains fields.

///Start code
PdfField FirstNameField = formWidget.FieldsWidget["breed"] as PdfField;
PdfTextBoxFieldWidget textBoxField = FirstNameField as PdfTextBoxFieldWidget;
//Change the value of the "firstname" field
textBoxField.Text = frm.dog.breed.breed1;
///End code

The FirstNameField is correctly discovered. But when I try to change the Text of that field, I get this error:

System.FormatException: 'Input string was not in a correct format.'

Here is the stack trace:

at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
at Spire.Pdf.Widget.PdfStyledFieldWidget.get_Font()
at Spire.Pdf.Widget.PdfStyledFieldWidget.GraphicsProperties..ctor(PdfStyledFieldWidget fieldWidget)
at Spire.Pdf.Widget.PdfStyledFieldWidget.GetGraphicsProperties(GraphicsProperties& graphicsProperties, PdfFieldWidgetItem widgetItem)
at Spire.Pdf.Widget.PdfTextBoxFieldWidget.ᜀ(PdfCanvas A_0, PdfFieldWidgetItem A_1)
at Spire.Pdf.Widget.PdfTextBoxFieldWidget.ᜀ(spr᝴ A_0)
at Spire.Pdf.Widget.PdfTextBoxFieldWidget.ᜀ(String A_0)
at Spire.Pdf.Widget.PdfTextBoxFieldWidget.set_Text(String value)
at Entryline.Controllers.reportsController.PrintForms(List`1 formids) in C:\Projects\Entryline_MVC\Entryline\Controllers\reportsController.cs:line 153
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()

temilson
 
Posts: 1
Joined: Mon Nov 12, 2018 8:22 pm

Tue Nov 13, 2018 6:30 am

Hi temilson,

Thanks for your inquiry.
As for the issue you encountered, since each document has unique structure, to help us locate your issue quickly and accurately, please upload your input PDF file here, or send it to us(support@e-iceblue.com) via email.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Nov 20, 2018 8:53 am

Hi temilson,

Greeting from E-iceblue.
Has your issue been resolved? If not, please provide your input file.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF