Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to use iTextSharp to Manipulate PDF Content
Message
From
30/10/2015 04:19:42
 
 
To
29/10/2015 14:05:02
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 5.0
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01626629
Message ID:
01626688
Views:
55
>Can you post the relevant pdf/fdf files ?
>
>No Need :) Anyway, the part that fills in the PDF from FDF works without any problems. But I finally managed to get this one working. In case anyone else winds up needing to do this, here is the code that works:
>
>
>FdfReader fdfReader = new FdfReader("c:\\apps5\\nexus\\Omaha_IAF.fdf");
>PdfReader pdfReader = new PdfReader("c:\\apps5\\nexus\\Omaha_IAF.pdf");
>
>PdfStamper stamper = new PdfStamper(pdfReader, new FileStream("c:\\apps5\\nexus\\Omaha_IAF_Test.pdf", FileMode.Create), '\0', true);
>stamper.AcroFields.SetFields(fdfReader);
>AcroFields Form = stamper.AcroFields;
>PushbuttonField Cmd = Form.GetNewPushbuttonFromField("cmdSignature");
>Cmd.Layout = PushbuttonField.LAYOUT_ICON_ONLY;
>Cmd.ProportionalIcon = true;
>Cmd.BorderWidth = 0;
>Cmd.Visibility = BaseField.VISIBLE;
>Cmd.Image = iTextSharp.text.Image.GetInstance("e:\\marcia\\AkSig.tif");
>Boolean Success = Form.ReplacePushbuttonField("cmdSignature", Cmd.Field);
>Form.RenameField("cmdSignature", "cmdActualSignature");
>stamper.Close();
>
>axAcroPDF1.LoadFile("c:\\apps5\\nexus\\Omaha_IAF_Test.pdf");
>axAcroPDF1.setShowToolbar(true);
>
>
>Update: Oh, Major WAAAAHHHH! I got this working in Visual Studio but I still can't get it working properly in VFP :(

I see in the docs that PushButtonField.LAYOUT_ICON_ONLY is int 2.
Did you try that ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform