DynaPDF Manual - Page 675

Previous Page 674   Index   Next Page 676

Function Reference
Page 675 of 818
dtFitH_Top
Display the page designated by page with the vertical coordinate top
positioned at the top edge of the window and the contents of the page
magnified just enough to fit the entire width of the page within the window.
Example:
// The parameter a specifies the top coordinate
pdfSetBookmarkDest(pdf, bmk, dtFitH_Top, 750, 0, 0, 0);
dtFitV_Left:
Display the page designated by page with the horizontal coordinate left
positioned at the left edge of the window and the contents of the page
magnified just enough to fit the entire height of the page within the window.
Example:
// The parameter a specifies the left edge
pdfSetBookmarkDest(pdf, bmk, dtFitV_Left, 50, 0, 0, 0);
dtFit_Rect
Display the page designated by page with its contents magnified just enough
to fit the rectangle specified by the coordinates left bottom right and top
entirely within the window both horizontally and vertically. If the required
horizontal and vertical magnification factors are different, use the smaller of
the two, centering the rectangle within the window in the other dimension.
Note, the maximum zoom factor supported by Adobe's Acrobat is limited to
16 (Acrobat 4/5) or 64 if Acrobat 6 is used. It is not possible to zoom into the
rectangle if it is too small.
Example:
pdfSetBookmarkDest(pdf, bmk,dtFit_Rect,150,550,450,700);
The destination types dtFitB, dtFitBH_Top and dtFitBV_Left use always the media box of the page to
fit the page into the window. All other destination types use the crop box if any.
As you can see above that the usage of the destination types are the same as for a go-to action. The
function creates in real a go-to action which is executed by the bookmark. However, the action is
stored in a more compact format and cannot be shared with other objects.
If a destination should be used with multiple objects such as page links, create a go-to action instead
and add it to the bookmark with the function AddActionToObj(). The same action can then be
added to other objects.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetBookmarkDest

Next topic: SetBookmarkStyle, SetBorderStyle


Start Chat