IPXV_Control::GoToDestination Method
From PDF XChange PDF SDK
m (Automatic page editing by robot) |
|||
Line 19: | Line 19: | ||
== 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 05: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); }