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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - GetFormField data
  FAQ FAQ  Forum Search   Register Register  Login Login

GetFormField data

 Post Reply Post Reply
Author
Message
Laiskam View Drop Down
Beginner
Beginner
Avatar

Joined: 03 Mar 14
Location: China
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Laiskam Quote  Post ReplyReply Direct Link To This Post Topic: GetFormField data
    Posted: 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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 04 Mar 14 at 8:21AM

Hello,

Out of interest can you try calling 

"DPLGetFormFieldCaptionA" or "DPLGetFormFieldValueA" and see if is still crashes.

Andrew.
Back to Top
Laiskam View Drop Down
Beginner
Beginner
Avatar

Joined: 03 Mar 14
Location: China
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Laiskam Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Laiskam View Drop Down
Beginner
Beginner
Avatar

Joined: 03 Mar 14
Location: China
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Laiskam Quote  Post ReplyReply Direct Link To This Post 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.
 
 
 
 
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store