Hello, I am a developer using Delphi to view PDFs within our program, and I was wondering if you support the highlighting of Form Fields. From looking through the forums, I got the impression that you could, and the help file seems to imply this, but I can't figure out exactly how to test whether or not it works. I am testing with a PDF that I know has form fields, but when I tried to use the examples that came with the SDK, it gave an "unspecified error."
Anyway, I am stuck, and was wondering if you could help me.
Highlighting Form Fields
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Highlighting Form Fields
You can try to use next code:
Code: Select all
var
vDataIn,vDataOut:OleVariant;
begin
....
vDataIn := 'HilightFormFields';
CoPDFXCview1.DoVerb('', 'ExecuteCommand', vDataIn, vDataOut, 0);
....
end;
-
- User
- Posts: 15
- Joined: Tue Jan 27, 2009 2:38 pm
Re: Highlighting Form Fields
Well... that seemed to not give an error, but it still doesn't seem to be highlighting the formfields.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Highlighting Form Fields
That’s strange.. Can you give us PDF file on which form fields highlight is not working?
-
- User
- Posts: 15
- Joined: Tue Jan 27, 2009 2:38 pm
Re: Highlighting Form Fields
Here you go.
You do not have the required permissions to view the files attached to this post.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Highlighting Form Fields
As I can see, Viewer ActiveX with default settings, highlights form fields fine by using 'HilightFormFields' command. But in some cases highlighting of some fields (or all fields) may be disabled by user. This can be checked in Document Options Toolbar.
To enable highlighting of all form fields you can use 'HilightAllFormFields' command - this will highlight all fields, but notice that this command cannot hide highlighting.
To enable highlighting of all form fields you can use 'HilightAllFormFields' command - this will highlight all fields, but notice that this command cannot hide highlighting.
What exactly example have you tried?but when I tried to use the examples that came with the SDK, it gave an "unspecified error."
-
- User
- Posts: 15
- Joined: Tue Jan 27, 2009 2:38 pm
Re: Highlighting Form Fields
I was trying to use the example from the "PDF-XChange Viewer SDK\Examples\DelphiExamples\PDFViewerActiveXTestDelphi" folder to see how it was supposed to be done.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Highlighting Form Fields
That was just EOleException or something else? And what version of Delphi you are using?
-
- User
- Posts: 15
- Joined: Tue Jan 27, 2009 2:38 pm
Re: Highlighting Form Fields
I actually found the issue. The code you gave me earlier was exactly right, I wasn't aware we weren't using the latest version of PDFX-Viewer. Once I upgraded it worked perfect.