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!
![]() |
GetFormField data |
Post Reply
|
| Author | |
Laiskam
Beginner
Joined: 03 Mar 14 Location: China Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: GetFormField dataPosted: 03 Mar 14 at 2:06PM |
|
I have an Access 2007 project, I want to get some data from a Form Pdf file.
When the function "DPLGetFormFieldCaption" or "DPLGetFormFieldValue" run, the Access application will shutdown with no any error message.
P.s. The function "DPLFormFieldCount" can return the count of fields correctly.
Code list:
Dim iInstanceID As Long
Dim iFieldsCount As Long Dim iOpenStatus As Long Dim strCaption As String Dim iIndex As Long Dim iErrorCode As Integer iInstanceID = DPLCreateLibrary() If DPLUnlockKey(iInstanceID, QP_LicenseKey) = 1 Then
iOpenStatus = DPLLoadFromFile(iInstanceID, strFileName, "")
iFieldsCount = DPLFormFieldCount(iInstanceID) iIndex = iFieldsCount strCaption = DPLGetFormFieldValue(iInstanceID, iIndex) DPLReleaseLibrary (iInstanceID) Else
MsgBox "Error"
End If
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Mar 14 at 7:41AM |
|
Hi!
I don't have a real solution but to give you an idea... I've made same experiences with ms access 2007 (older ms access versions work fine!). It should have to do about how to handle the string values. The QuickPDF-function returns with a widestring... Cheers and welcome here, Ingo |
|
|
Cheers,
Ingo |
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 Mar 14 at 8:21AM |
|
Hello, "DPLGetFormFieldCaptionA" or "DPLGetFormFieldValueA" and see if is still crashes. Andrew.
|
|
![]() |
|
Laiskam
Beginner
Joined: 03 Mar 14 Location: China Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 Mar 14 at 7:46PM |
|
This time, I try to use C++ code to do this , but I cant get the value that I need. Only a blank string be returned when the "DPLGetFormFieldCaption" work. The function "DPLFormFieldCount" can work correctly and return a int.
int iInstanceID;
int iOpenStatus; int iFieldsCount; wchar_t* strCaption; iInstanceID = DPLCreateLibrary();
if (DPLUnlockKey(iInstanceID, L"XXXXXXXXXXXXXX") == 1)
{
iOpenStatus = DPLLoadFromFile(iInstanceID, L"E:\\a.pdf", L"");
iFieldsCount = DPLFormFieldCount(iInstanceID); strCaption = DPLGetFormFieldCaption(iInstanceID,4); ShowMessage(strCaption); ShowMessage(IntToStr(iFieldsCount)); } DPLReleaseLibrary(iInstanceID); Thanks!
|
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 Mar 14 at 6:31AM |
|
Laiskam, Can you please send us the A.PDF so we can test it in C# / Delphi to make sure it is possible to process this file correctly. Or you can try adding the code into a custom script in the Debenu Quick PDF library Demo program. Andrew. |
|
![]() |
|
Laiskam
Beginner
Joined: 03 Mar 14 Location: China Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 Mar 14 at 8:12AM |
|
Thanks Andrew,
This issue had solved with C++. I make a stupid mistake. I should use the function "GetFormFieldTitle" , not "GetFormfieldCaption", because the caption of field is blank.
But it cant work correctly with VBA.
|
|
![]() |
|
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