Highlighting Form Fields

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

jps8834
User
Posts: 15
Joined: Tue Jan 27, 2009 2:38 pm

Highlighting Form Fields

Post by jps8834 »

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.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Highlighting Form Fields

Post by Corwin - Tracker Sup »

You can try to use next code:

Code: Select all

var
  vDataIn,vDataOut:OleVariant;
begin
....
  vDataIn := 'HilightFormFields';
  CoPDFXCview1.DoVerb('', 'ExecuteCommand', vDataIn, vDataOut, 0);
....
end;
jps8834
User
Posts: 15
Joined: Tue Jan 27, 2009 2:38 pm

Re: Highlighting Form Fields

Post by jps8834 »

Well... that seemed to not give an error, but it still doesn't seem to be highlighting the formfields.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Highlighting Form Fields

Post by Corwin - Tracker Sup »

That’s strange.. Can you give us PDF file on which form fields highlight is not working?
jps8834
User
Posts: 15
Joined: Tue Jan 27, 2009 2:38 pm

Re: Highlighting Form Fields

Post by jps8834 »

Here you go.
You do not have the required permissions to view the files attached to this post.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Highlighting Form Fields

Post by Corwin - Tracker Sup »

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.
but when I tried to use the examples that came with the SDK, it gave an "unspecified error."
What exactly example have you tried?
jps8834
User
Posts: 15
Joined: Tue Jan 27, 2009 2:38 pm

Re: Highlighting Form Fields

Post by jps8834 »

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.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Highlighting Form Fields

Post by Corwin - Tracker Sup »

That was just EOleException or something else? And what version of Delphi you are using?
jps8834
User
Posts: 15
Joined: Tue Jan 27, 2009 2:38 pm

Re: Highlighting Form Fields

Post by jps8834 »

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.