Skip to main content
Participant
October 12, 2024
Question

How do I set initial Zoom to InheritZoom in PDViewDestCreate()

  • October 12, 2024
  • 1 reply
  • 238 views

The calling sequence for PDFViewDestCreate() is

PDViewDestination PDViewDestCreate(PDDoc doc, PDPage initialPage, ASAtom initialFitType, const ASFixedRectP initialRect, const ASFixed initialZoom, ASInt32 pageNumber)

 

I want to set action on bookmarks to Inherit Zoom.

There is not fit type for inheritZoom. I suspect to get inheritZoom, I set the initialFitType to ASAtom("XYZ") and initialZoom to PDViewDestNULL. Can anyone verify if that is correct?

 

According to:

https://opensource.adobe.com/dc-acrobat-sdk-docs/library/plugin/Plugins_Bookmark.html#creating-a-pdviewdestination-object

Possible fitTypes are:

ValueDescription

XYZ

Destination specified as upper-left corner point and a zoom factor.

Fit

Fits the page into the window, corresponding to the Acrobat viewer’s Fit Page menu item.

FitH

Fits the width of the page into the window, corresponding to the Acrobat viewer’s Fit Width menu item.

FitV

Fits the height of the page into a window.

FitR

Fits the rectangle specified by its upper-left and lower-right corner points into the window.

FitB

Fits the rectangle containing all visible elements on the page (known as the bounding box) into the window (corresponds to the Acrobat viewer’s Fit Visible menu item).

FitBH

Fits the width of the bounding box into the window.

FitBV

Fits the height of the bounding box into the window.

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Community Expert
October 14, 2024

In a document create a link with Inherit Zoom. Look at the generated internals of the file.