Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Pdfium API removed FPDFDest_GetPageIndex #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions PdfiumViewer/NativeMethods.Pdfium.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,11 @@ public static IntPtr FPDFLink_GetDest(IntPtr document, IntPtr link)
}
}

public static uint FPDFDest_GetPageIndex(IntPtr document, IntPtr dest)
public static uint FPDFDest_GetDestPageIndex(IntPtr document, IntPtr dest)
{
lock (LockString)
{
return Imports.FPDFDest_GetPageIndex(document, dest);
return Imports.FPDFDest_GetDestPageIndex(document, dest);
}
}

Expand Down Expand Up @@ -712,7 +712,7 @@ private static class Imports
public static extern IntPtr FPDFLink_GetDest(IntPtr document, IntPtr link);

[DllImport("pdfium.dll")]
public static extern uint FPDFDest_GetPageIndex(IntPtr document, IntPtr dest);
public static extern uint FPDFDest_GetDestPageIndex(IntPtr document, IntPtr dest);

[DllImport("pdfium.dll")]
public static extern bool FPDFLink_GetAnnotRect(IntPtr linkAnnot, FS_RECTF rect);
Expand Down
4 changes: 2 additions & 2 deletions PdfiumViewer/PdfFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public PdfPageLinks GetPageLinks(int pageNumber, Size pageSize)
string uri = null;

if (destination != IntPtr.Zero)
target = (int)NativeMethods.FPDFDest_GetPageIndex(_document, destination);
target = (int)NativeMethods.FPDFDest_GetDestPageIndex(_document, destination);

var action = NativeMethods.FPDFLink_GetAction(annotation);
if (action != IntPtr.Zero)
Expand Down Expand Up @@ -227,7 +227,7 @@ private uint GetBookmarkPageIndex(IntPtr bookmark)
{
IntPtr dest = NativeMethods.FPDF_BookmarkGetDest(_document, bookmark);
if (dest != IntPtr.Zero)
return NativeMethods.FPDFDest_GetPageIndex(_document, dest);
return NativeMethods.FPDFDest_GetDestPageIndex(_document, dest);

return 0;
}
Expand Down