AddLaunchAction Basic vs. AddLaunchAction Professional

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
bergamot
User
Posts: 4
Joined: Fri Nov 20, 2009 9:11 am

AddLaunchAction Basic vs. AddLaunchAction Professional

Post by bergamot »

Hi, All

It's me again - sorry :D

Could you comment why AddLaunchAction generates different dictionaries, while having
almost identical signature (see Annex I, Annex II)?

The basic version of this function creates the action dictionary that
works with relative file names:

Code: Select all

<<
/Type /Annot
/Rect [72 680 540 690]
/C [0.392 0 0]
/Border [0 0 0]
/Subtype /Link
/A <</S /Launch /F (chapters/chapter01.pdf)>>
>>
It works with going up in folder structure as well ("..\toc.pdf")

And the professional version wraps file specification into the optional /Win dictionary:

Code: Select all

<<
/A <</S /Launch /Win <</F (BBB\\doc2.pdf) >> /Type /Action >>
/C [0.39216 0 0]
/BS <</S /D >>
/Rect [551 774 576 782]
/Type /Annot
/Subtype /Link
>>
In this case we have the specific yet optional syntax for Link action on Windows platform.

Unfortunately this is not working properly with relative file names (tested with Adobe Reader 8.*,9.*)
Only the first link will work, if you then try to go up from chapter to the table of contents it won't work.

Alexey


Annex I . Basic Library Version

Code: Select all

HRESULT  PXC_AddLaunchActionA(
    _PXCContent* content,
    LPCPXC_RectF rect,
    LPCSTR lpszFileName, LPCSTR lpszParams,
    PXC_LaunchOperation oper, const PXC_CommonAnnotInfo* pInfo);
Annex II. Pro Library Version:

Code: Select all

HRESULT  PXCp_AddLaunchActionA(
    PDFDocument hDocument, DWORD PageNumber,
    LPCPXC_RectF rect,
    LPCSTR lpszFileName, LPCSTR lpszParams,
    PXC_LaunchOperation oper,
    const PXC_CommonAnnotInfo* pInfo
);
Post Reply