no print fields value
Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1060
Printed Date: 25 Jun 25 at 5:53PM Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com
Topic: no print fields value
Posted By: calfasoft
Subject: no print fields value
Date Posted: 14 Apr 09 at 9:17AM
Hello and excuse for my bad enghlish...
I have try QUICKpdf and i think that is a wonderful program, but there is a problem that i has not solved.
I have created with acrobat a file with 5 fields. With VB6 and QUICKpdf i can read the file, and insert or modify the content of my fields. I can also save te new files, and if i open it with acrobat I can read the content of the fields that i've changed with my program...
the problem is : when I print the file from my program, the fields are all BLANK !!!!
I've try many solutions, also saved the files, re open and print, but the result is the some. The fields are BLANK !!!
can you help me ?
this is the code :
Dim ClassName Dim LicenseKey Dim FileName, FileNameNew, Instance(5) As Long
ClassName = "QuickPDFAX0712.PDFLibrary" LicenseKey = "j74gf38u9i88w97zu88w7gb7y" FileName = "scheda.pdf" FileNameNew = "scheda_new.pdf"
Dim QP As QuickPDFAX0712.PDFLibrary Dim Result
Set QP = New QuickPDFAX0712.PDFLibrary ' CreateObject(ClassName) Print ("Library version: " + QP.LibraryVersion) Result = QP.UnlockKey(LicenseKey)
If Result = 1 Then Print ("Valid license key: " + QP.LicenseInfo) Print Instance(0) = QP.LoadFromFile(FileName) Print "Instance(0) ; "; Instance(0) Instance(1) = QP.FindFormFieldByTitle("Nome") Print "Instance(1) ; "; Instance(1) Print "GetFormFieldPrintable : "; QP.GetFormFieldPrintable(Instance(1)) Instance(2) = QP.SetFormFieldValue(Instance(1), "Fabio") Print "Instance(2) ; "; Instance(2) QP.SetFormFieldValueByTitle "Cognome", "Calzeroni" QP.SetFormFieldValueByTitle "Indirizzo", "Via Borgomanero, 26" QP.SetFormFieldValueByTitle "CAP", "28040 PARUZZARO (NO)" If QP.SaveToFile(FileNameNew) = 1 Then Print ("File " + FileNameNew + " written successfully") Else Print ("Error, file could not be written") End If QP.PrintDocument "hp LaserJet 1320 PCL 5e", 1, 1, 0 Else Print ("- Invalid license key -") Print ("Please set your license key by editing this file") End If
Set QP = Nothing
thankyou...
|
Replies:
Posted By: Ingo
Date Posted: 14 Apr 09 at 9:29AM
Hi!
Without reading your code ... Did you use FlattenFormfield before? ... It's necessary.
Cheers, Ingo
|
Posted By: calfasoft
Date Posted: 14 Apr 09 at 9:37AM
 GOOD !!! now it's ok...
i've search in the forum this question, but i've not find any solutions.
now i can proced to realize my program, and buy the regular version of the library.
thankyou !!
Fabio
|
Posted By: calfasoft
Date Posted: 14 Apr 09 at 9:51AM
I've solved with this simple function:
Sub SetFormFields(ByRef TmpQP As QuickPDFAX0712.PDFLibrary, ByVal FieldName As String, FieldValue As String)
Dim TmpI As Long
With TmpQP
TmpI = .FindFormFieldByTitle(FieldName)
.SetFormFieldValue TmpI, FieldValue
.FlattenFormField TmpI
End With
End Sub
|
|