|
@@ -1,6 +1,7 @@
|
|
|
using ComPDFKit.PDFDocument;
|
|
|
using ComPDFKit.PDFDocument.Action;
|
|
|
using ComPDFKit.Tool;
|
|
|
+using ComPDFKit.Viewer.Helper;
|
|
|
using Compdfkit_Tools.PDFControlUI;
|
|
|
using ComPDFKitViewer;
|
|
|
using System;
|
|
@@ -49,9 +50,18 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
CPDFViewer pdfViewer = ViewControl.PDFViewTool.GetCPDFViewer();
|
|
|
CPDFDocument pdfDoc = pdfViewer.GetDocument();
|
|
|
CPDFDestination dest = outline.GetDestination(pdfDoc);
|
|
|
+ Size size = DataConversionForWPF.CSizeConversionForSize( pdfDoc.GetPageSize(Convert.ToInt32(dest.PageIndex) - 1));
|
|
|
+ if (dest.Position_X == -1)
|
|
|
+ {
|
|
|
+ dest.Position_X = 0;
|
|
|
+ }
|
|
|
+ if (dest.Position_Y == -1)
|
|
|
+ {
|
|
|
+ dest.Position_Y = (float)size.Height;
|
|
|
+ }
|
|
|
if (dest != null)
|
|
|
{
|
|
|
- pdfViewer.GoToPage(dest.PageIndex, new Point(dest.Position_X, dest.Position_Y));
|
|
|
+ pdfViewer.GoToPage(dest.PageIndex, new Point(dest.Position_X, size.Height - dest.Position_Y));
|
|
|
}
|
|
|
}
|
|
|
}
|