Discussion:
[OT] Links to PDF manual
(too old to reply)
David Wilkinson
2009-04-07 16:55:01 UTC
Permalink
A bit OT, but..

A few years back I wrote an MFC application for a client, and he wrote an HTML
Help user manual for it using (I think) Doc2Help.

We have recently updated the program and we need to update the manual. My client
is very into LaTeX these days, and so he wants to create the new manual using
LateX and PDF rather than Word and CHM.

He thinks he knows how to do this, but how do I link the program to the
generated PDF file?

Right now the links to the CHM are all done with ::HtmlHelp() with
HH_DISPLAY_TOPIC and a page reference like "Path\xxx.chm::/yyy.htm. I think the
page names yyy are derived from the section names in the original Word document.

Is there some Adobe API for linking to Sections of the PDF document?

Can we do this without using a third party help application?
--
David Wilkinson
Visual C++ MVP
Tom Serface
2009-04-07 21:44:01 UTC
Permalink
You could apply for the Adobe Reader SDK, but there is a royalty on it. I
just use the Adobe Reader ActiveX control in a window in my program and that
works pretty good. You get all the toolbars with search, goto page, etc.
There are a bunch of page setting mechanisms in the ActiveX like:

void gotoFirstPage()
{
InvokeHelper(0x4, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void gotoLastPage()
{
InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void gotoNextPage()
{
InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void gotoPreviousPage()
{
InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void setCurrentPage(long n)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, n);
}

But I haven't used them. I suppose you could know where in the code your
help is and do context help by setting it to the appropriate page.

Tom
Post by David Wilkinson
A bit OT, but..
A few years back I wrote an MFC application for a client, and he wrote an
HTML Help user manual for it using (I think) Doc2Help.
We have recently updated the program and we need to update the manual. My
client is very into LaTeX these days, and so he wants to create the new
manual using LateX and PDF rather than Word and CHM.
He thinks he knows how to do this, but how do I link the program to the
generated PDF file?
Right now the links to the CHM are all done with ::HtmlHelp() with
HH_DISPLAY_TOPIC and a page reference like "Path\xxx.chm::/yyy.htm. I
think the page names yyy are derived from the section names in the
original Word document.
Is there some Adobe API for linking to Sections of the PDF document?
Can we do this without using a third party help application?
--
David Wilkinson
Visual C++ MVP
David Wilkinson
2009-04-09 14:25:10 UTC
Permalink
Post by Tom Serface
You could apply for the Adobe Reader SDK, but there is a royalty on it.
I just use the Adobe Reader ActiveX control in a window in my program
and that works pretty good. You get all the toolbars with search, goto
page, etc. There are a bunch of page setting mechanisms in the ActiveX
void gotoFirstPage()
{
InvokeHelper(0x4, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void gotoLastPage()
{
InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void gotoNextPage()
{
InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void gotoPreviousPage()
{
InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void setCurrentPage(long n)
{
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, n);
}
But I haven't used them. I suppose you could know where in the code
your help is and do context help by setting it to the appropriate page.
Thanks, Tom.

You have actually used PDF for Help file? Or are you just displaying some
external PDF file in your application?

I think what I need is a method of jumping to section headings in the document,
which is all that we do with the current HTMLHelp manual.

I think I'll just create a test MFC application and try the Adobe Reader ActiveX
control and se what I can do with it.

Thanks again,
--
David Wilkinson
Visual C++ MVP
Drew
2009-04-13 19:52:23 UTC
Permalink
This can be done using DDE. See:

http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=IAC_API_DDE_Messages.104.1.html

Drew
Post by David Wilkinson
A bit OT, but..
A few years back I wrote an MFC application for a client, and he wrote an
HTML Help user manual for it using (I think) Doc2Help.
We have recently updated the program and we need to update the manual. My
client is very into LaTeX these days, and so he wants to create the new
manual using LateX and PDF rather than Word and CHM.
He thinks he knows how to do this, but how do I link the program to the
generated PDF file?
Right now the links to the CHM are all done with ::HtmlHelp() with
HH_DISPLAY_TOPIC and a page reference like "Path\xxx.chm::/yyy.htm. I
think the page names yyy are derived from the section names in the
original Word document.
Is there some Adobe API for linking to Sections of the PDF document?
Can we do this without using a third party help application?
--
David Wilkinson
Visual C++ MVP
David Wilkinson
2009-04-17 20:31:36 UTC
Permalink
Post by Drew
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=IAC_API_DDE_Messages.104.1.html
Drew:

To tell the truth, I have never used DDE. How is this better than using the
Active-X control described by Tom?

I have the Active-X control working, but I do not seem to be able to jump to
Section headings/thumbnails, which is the analog to what you do in a CHM help file.
--
David Wilkinson
Visual C++ MVP
Tom Serface
2009-04-17 20:37:13 UTC
Permalink
Yeah, to be honest, I've never treid to do anything, but pull up the
document. I think you can go to pages, but I don't know about section
headings.

There is a PDF API that has more features, but I think you need to pay a
royalty for it.

Tom
Post by David Wilkinson
Post by Drew
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=IAC_API_DDE_Messages.104.1.html
To tell the truth, I have never used DDE. How is this better than using
the Active-X control described by Tom?
I have the Active-X control working, but I do not seem to be able to jump
to Section headings/thumbnails, which is the analog to what you do in a
CHM help file.
--
David Wilkinson
Visual C++ MVP
David Wilkinson
2009-04-20 15:03:53 UTC
Permalink
Post by David Wilkinson
To tell the truth, I have never used DDE. How is this better than using
the Active-X control described by Tom?
I have the Active-X control working, but I do not seem to be able to jump
to Section headings/thumbnails, which is the analog to what you do in a
CHM help file.
That's just it. You can embed tags in the PDF that you can jump to using
DDE using DdeClientTransaction() with an argument which uses
DocGoToNameDest.
Drew:

The Active-X control has a method setNamedDest(), but it does not work with
section/thumbnail headings.

AS I said, the plan is to use LaTeX to generate the PDF. I guess we will have to
see if LaTeX is capable of embedding these tags.
--
David Wilkinson
Visual C++ MVP
Drew
2009-04-20 14:30:50 UTC
Permalink
Below...
Post by David Wilkinson
Post by Drew
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=IAC_API_DDE_Messages.104.1.html
To tell the truth, I have never used DDE. How is this better than using
the Active-X control described by Tom?
I have the Active-X control working, but I do not seem to be able to jump
to Section headings/thumbnails, which is the analog to what you do in a
CHM help file.
That's just it. You can embed tags in the PDF that you can jump to using
DDE using DdeClientTransaction() with an argument which uses
DocGoToNameDest.

Drew

Drew
2009-04-13 19:51:52 UTC
Permalink
Post by David Wilkinson
A bit OT, but..
A few years back I wrote an MFC application for a client, and he wrote an
HTML Help user manual for it using (I think) Doc2Help.
We have recently updated the program and we need to update the manual. My
client is very into LaTeX these days, and so he wants to create the new
manual using LateX and PDF rather than Word and CHM.
He thinks he knows how to do this, but how do I link the program to the
generated PDF file?
Right now the links to the CHM are all done with ::HtmlHelp() with
HH_DISPLAY_TOPIC and a page reference like "Path\xxx.chm::/yyy.htm. I
think the page names yyy are derived from the section names in the
original Word document.
Is there some Adobe API for linking to Sections of the PDF document?
Can we do this without using a third party help application?
--
David Wilkinson
Visual C++ MVP
Continue reading on narkive:
Loading...