Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Fill out a form with vba |
Post Reply |
Author | |
eternity
Beginner Joined: 10 Feb 19 Location: italy Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 11 Feb 19 at 8:20AM |
hello I'm trying to create a code with the DebenuPDFLibrary64Lite1114 in vba to fill out a form and save it. is it possible with this library? i have made this code Private Sub Comando0_Click() Dim pdf As Object Dim strmodello As String Dim file As String Set pdf = CreateObject("DebenuPDFLibrary64Lite1114.PDFLibrary") Call pdf.LoadFromFile("C:\pippo\Modello.pdf", "") pdf.SetNeedAppearances (0) Call pdf.DeleteFormField(codicefiscale) Call pdf.SetFormFieldValue(codicefiscale, "dng") Call pdf.SaveToFile("C:\pippo\stampa.pdf") Set pdf = Nothing End Sub where codicefiscale is the name of the field of the form then i have the "error 438 propriety or method are not supported form object" |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi eternity, yes... with QuickPDF it's possible to fill out, read and/or save formfields. To your system environment: The old vba is 32 bit i think and you're working with the 64-bit-dll ... i don't think this will work ;-) The other thing: QuickPDF uses unicode strings - so you have to convert the content from the old vba to unicode before using string functions from the library. Details: DeleteFormField needs the index of a form field - not the name of a form field. The other thing: A real deletion of a form field and setting a value as next action doesn't make sense ;-) You should have a look here in the samples-section regarding form fields. Here's a sample about how to create form fields: https://www.debenu.com/kb/create-pdf-form-fields-programmatically/ Cheers and welcome here, Ingo |
|
Cheers,
Ingo |
|
eternity
Beginner Joined: 10 Feb 19 Location: italy Status: Offline Points: 4 |
Post Options
Thanks(0)
|
thanks for the reply,
I'm using access 2013 64 bit what can i do for work QickPDF? i'm using an existing form. i have to create form fields?
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
if you're using an existing form then i think you want to read the inserted content?
This you can do with QuickPDF. You can create a new pdf form with QuickPDF, too. You can create a pdf form... You can insert and save values into existing pdf form fields... You can read existing content from pdf form fields... All this you can do with QuickPDF. Here are the relevant functionalities: https://www.debenu.com/docs/pdf_library_reference/FormFields.php |
|
Cheers,
Ingo |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Here there are few first sample steps for your first steps:
How to get a value from a pdf form field: try QP := TDebenuPDFLibrary1211.Create; try // QP.UnlockKey('I have inserted my license key here'); QP.LoadFromFile(FileName, ''); If QP.EncryptionStatus > 0 Then QP.Decrypt; ffc := QP.FormFieldCount; if ffc > 0 then begin nresult := QP.FindFormFieldByTitle(FieldName); xresult := QP.GetFormFieldValueByTitle(FieldName); // . . . How to set values into a pdf form field: try QP := TDebenuPDFLibrary1211.Create; try // QP.UnlockKey('I have inserted my license key here'); QP.LoadFromFile(FileName, ''); If QP.EncryptionStatus > 0 Then QP.Decrypt; ffc := QP.FormFieldCount; if ffc > 0 then begin QP.SetNeedAppearances(1); QP.SetFormFieldValue( StrToInt(Trim(FieldName)), FieldValue ); QP.UpdateAppearanceStream( StrToInt(Trim(FieldName)) ); // QP.FlattenFormField( StrToInt(Trim(FieldName)) ); // . . . Additionally here you'll find the developer guide. Inside there's a section 4.10 regarding pdf forms: http://www.debenu.com/docs/pdf_library_developer_guide/foxit_quick_pdf_library_15_developer_guide.pdf |
|
Cheers,
Ingo |
|
eternity
Beginner Joined: 10 Feb 19 Location: italy Status: Offline Points: 4 |
Post Options
Thanks(0)
|
but i'm using lite version and i don't have license key
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
so there's only less you can do.
Check out which functionalities i've described are in the lite-version and then play a little bit... Or you do it the other way and download the normal library and asking for an evaluation key limited for 30 days from here: https://www.debenu.com/products/development/debenu-pdf-library/trial/ Edited by Ingo - 12 Feb 19 at 4:58PM |
|
Cheers,
Ingo |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store