IPXV_Control::GoToDestination Method
From PDF XChange PDF SDK
m (Automatic page editing by robot) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
[[Category:Editor]] | [[Category:Editor]] | ||
{{#customTitle:IPXV_Control::GoToDestination Method}} | {{#customTitle:IPXV_Control::GoToDestination Method}} | ||
− | {{#parentPage:PXV:IPXV_Control#Methods|GoToDestination | + | {{#parentPage:PXV:IPXV_Control#Methods|GoToDestination|method}} |
− | + | ||
{{ToReview}} | {{ToReview}} | ||
− | + | Navigates in pages view to the specified destination point on pages. | |
== Syntax == | == Syntax == | ||
− | <pre class="brush:cpp;gutter:false">HRESULT GoToDestination([in] PXC_Destination* | + | <pre class="brush:cpp;gutter:false">HRESULT GoToDestination([in] PXC_Destination* stDest, |
[in, defaultvalue(0)] ULONG nGoDestFlags);</pre> | [in, defaultvalue(0)] ULONG nGoDestFlags);</pre> | ||
== Parameters == | == Parameters == | ||
− | ; | + | ;stDest |
− | :[in] Pointer to [[PXV:PXC_Destination|PXC_Destination]]. | + | :[in] Pointer to [[PXV:PXC_Destination|PXC_Destination]] structure that specifies new view point on the pages view. |
;nGoDestFlags | ;nGoDestFlags | ||
− | :[in, defaultvalue(0)] | + | :[in, defaultvalue(0)] An additional flags, see [[PXV:PXV_GotoDestinationFlags|PXV_GotoDestinationFlags]]. |
== Return Value == | == Return Value == | ||
Returns S_OK if operation was successful or error code in other cases. | Returns S_OK if operation was successful or error code in other cases. | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:c#">//C# | ||
+ | private void zoomToContentToolStripMenuItem_Click(object sender, EventArgs e) | ||
+ | { | ||
+ | uint nPageNumber = 0; | ||
+ | PDFXEdit.PXC_Rect rcBBox = pdfCtl.Doc.CoreDoc.Pages[nPageNumber].get_Box(PDFXEdit.PXC_BoxType.PBox_BBox); | ||
+ | PDFXEdit.PXC_Destination dest = new PDFXEdit.PXC_Destination(); | ||
+ | dest.nType = PDFXEdit.PXC_DestType.Dest_FitR; | ||
+ | dest.dValues = new Double[4]; | ||
+ | dest.dValues[0] = rcBBox.left; | ||
+ | dest.dValues[1] = rcBBox.bottom; | ||
+ | dest.dValues[2] = rcBBox.right; | ||
+ | dest.dValues[3] = rcBBox.top; | ||
+ | dest.nPageNum = nPageNumber; | ||
+ | pdfCtl.GoToDestination(ref dest); | ||
+ | } | ||
+ | </pre> | ||
== See Also == | == See Also == | ||
[[PXV:IPXV_Control|IPXV_Control]] | [[PXV:IPXV_Control|IPXV_Control]] |
Latest revision as of 04:56, 6 May 2016
Navigates in pages view to the specified destination point on pages.
Syntax
HRESULT GoToDestination([in] PXC_Destination* stDest, [in, defaultvalue(0)] ULONG nGoDestFlags);
Parameters
- stDest
- [in] Pointer to PXC_Destination structure that specifies new view point on the pages view.
- nGoDestFlags
- [in, defaultvalue(0)] An additional flags, see PXV_GotoDestinationFlags.
Return Value
Returns S_OK if operation was successful or error code in other cases.
Sample
//C# private void zoomToContentToolStripMenuItem_Click(object sender, EventArgs e) { uint nPageNumber = 0; PDFXEdit.PXC_Rect rcBBox = pdfCtl.Doc.CoreDoc.Pages[nPageNumber].get_Box(PDFXEdit.PXC_BoxType.PBox_BBox); PDFXEdit.PXC_Destination dest = new PDFXEdit.PXC_Destination(); dest.nType = PDFXEdit.PXC_DestType.Dest_FitR; dest.dValues = new Double[4]; dest.dValues[0] = rcBBox.left; dest.dValues[1] = rcBBox.bottom; dest.dValues[2] = rcBBox.right; dest.dValues[3] = rcBBox.top; dest.nPageNum = nPageNumber; pdfCtl.GoToDestination(ref dest); }