Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to use iTextSharp to Manipulate PDF Content
Message
De
29/10/2015 14:05:02
 
 
À
29/10/2015 12:39:26
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 5.0
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01626629
Message ID:
01626645
Vues:
59
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 :(
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform