itextsharp - Set AcroField Text Size to Auto -


By using

itextsharp , I try to set the font size of the text field of my form I am auto .

I am currently doing something like this:

  object d = 0.0; PDF Reader Reader = New PDF Reader (Path); Byte [] pdf; (Var MS = Using new memorystream ()) {PDFstamper stammer = new PDFStamer (Reader, MS); AcroFields Field = stamper.AcroFields; Forchcha (field in field. Field .qins) {fields.SetFieldProperty (f, "textsize", d, null); }}   

But I'm getting the following error:

  System. Unauthorized Cast Option: The specified cast is not valid. ITextSharp.text.pdf.AcroFields.SetFieldProperty (string field, string name, object value, int32 [] inst)   

How can I fix it?

using 0f instead of call d By calling SetFieldProperty I can change the font size to Auto .

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -