Skip to content

Commit

Permalink
PDFium version v119.0.6043.0 chromium/6043 [master]
Browse files Browse the repository at this point in the history
+public static uint FPDF_GetDocUserPermissions(global::PDFiumCore.FpdfDocumentT document)
+public static int FPDF_MovePages(global::PDFiumCore.FpdfDocumentT document, ref int page_indices, uint page_indices_len, int dest_page_index)
  • Loading branch information
DJGosnell committed Oct 2, 2023
1 parent 57085d1 commit c52594b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 8 deletions.
2 changes: 1 addition & 1 deletion download_package.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dotnet build src/PDFiumCoreBindingsGenerator/PDFiumCoreBindingsGenerator.csproj -c Release
dotnet ./src/PDFiumCoreBindingsGenerator/bin/Release/net6.0/PDFiumCoreBindingsGenerator.dll 121484506 false
dotnet ./src/PDFiumCoreBindingsGenerator/bin/Release/net6.0/PDFiumCoreBindingsGenerator.dll 123291696 false
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>119.0.6015.0</Version>
<Version>119.0.6043.0</Version>
</PropertyGroup>
</Project>
70 changes: 64 additions & 6 deletions src/PDFiumCore/PDFiumCore.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Built from precompiled binaries at https://github.com/bblanchon/pdfium-binaries/releases/tag/chromium/6015
// Github release api https://api.github.com/repos/bblanchon/pdfium-binaries/releases/121484506
// PDFium version v119.0.6015.0 chromium/6015 [master]
// Built on: Mon, 18 Sep 2023 15:31:37 GMT
// Built from precompiled binaries at https://github.com/bblanchon/pdfium-binaries/releases/tag/chromium/6043
// Github release api https://api.github.com/repos/bblanchon/pdfium-binaries/releases/123291696
// PDFium version v119.0.6043.0 chromium/6043 [master]
// Built on: Mon, 02 Oct 2023 20:22:35 GMT
// ----------------------------------------------------------------------------
// <auto-generated>
// This is autogenerated code by CppSharp.
Expand Down Expand Up @@ -3195,6 +3195,9 @@ public partial struct __Internal
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDF_GetDocPermissions", CallingConvention = __CallingConvention.Cdecl)]
internal static extern uint FPDF_GetDocPermissions(__IntPtr document);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDF_GetDocUserPermissions", CallingConvention = __CallingConvention.Cdecl)]
internal static extern uint FPDF_GetDocUserPermissions(__IntPtr document);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDF_GetSecurityHandlerRevision", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDF_GetSecurityHandlerRevision(__IntPtr document);

Expand Down Expand Up @@ -3529,14 +3532,14 @@ public static uint FPDF_GetTrailerEnds(global::PDFiumCore.FpdfDocumentT document
}

/// <summary>
/// <para>Function: FPDF_GetDocPermission</para>
/// <para>Function: FPDF_GetDocPermissions</para>
/// <para>Get file permission flags of the document.</para>
/// <para>Parameters:</para>
/// <para>document - Handle to a document. Returned by FPDF_LoadDocument.</para>
/// <para>Return value:</para>
/// <para>A 32-bit integer indicating permission flags. Please refer to the</para>
/// <para>PDF Reference for detailed descriptions. If the document is not</para>
/// <para>protected, 0xffffffff will be returned.</para>
/// <para>protected or was unlocked by the owner, 0xffffffff will be returned.</para>
/// </summary>
public static uint FPDF_GetDocPermissions(global::PDFiumCore.FpdfDocumentT document)
{
Expand All @@ -3545,6 +3548,24 @@ public static uint FPDF_GetDocPermissions(global::PDFiumCore.FpdfDocumentT docum
return __ret;
}

/// <summary>
/// <para>Function: FPDF_GetDocUserPermissions</para>
/// <para>Get user file permission flags of the document.</para>
/// <para>Parameters:</para>
/// <para>document - Handle to a document. Returned by FPDF_LoadDocument.</para>
/// <para>Return value:</para>
/// <para>A 32-bit integer indicating permission flags. Please refer to the</para>
/// <para>PDF Reference for detailed descriptions. If the document is not</para>
/// <para>protected, 0xffffffff will be returned. Always returns user</para>
/// <para>permissions, even if the document was unlocked by the owner.</para>
/// </summary>
public static uint FPDF_GetDocUserPermissions(global::PDFiumCore.FpdfDocumentT document)
{
var __arg0 = document is null ? __IntPtr.Zero : document.__Instance;
var __ret = __Internal.FPDF_GetDocUserPermissions(__arg0);
return __ret;
}

/// <summary>
/// <para>Function: FPDF_GetSecurityHandlerRevision</para>
/// <para>Get the revision for the security handler.</para>
Expand Down Expand Up @@ -9228,6 +9249,9 @@ public partial struct __Internal
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPage_Delete", CallingConvention = __CallingConvention.Cdecl)]
internal static extern void FPDFPageDelete(__IntPtr document, int page_index);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDF_MovePages", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDF_MovePages(__IntPtr document, int* page_indices, uint page_indices_len, int dest_page_index);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPage_GetRotation", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFPageGetRotation(__IntPtr page);

Expand Down Expand Up @@ -9574,6 +9598,40 @@ public static void FPDFPageDelete(global::PDFiumCore.FpdfDocumentT document, int
__Internal.FPDFPageDelete(__arg0, page_index);
}

/// <summary>
/// <para>Experimental API.</para>
/// <para>Move the given pages to a new index position.</para>
/// <para>page_indices - the ordered list of pages to move. No duplicates allowed.</para>
/// <para>page_indices_len - the number of elements in |page_indices|</para>
/// <para>dest_page_index - the new index position to which the pages in</para>
/// <para>|page_indices| are moved.</para>
/// <para>Returns TRUE on success. If it returns FALSE, the document may be left in an</para>
/// <para>indeterminate state.</para>
/// <para>Example: The PDF document starts out with pages [A, B, C, D], with indices</para>
/// <para>[0, 1, 2, 3].</para>
/// <para>Move(doc, [3, 2], 2, 1); // returns true</para>
/// <para>// The document has pages [A, D, C, B].</para>
/// <para></para>
/// <para>Move(doc, [0, 4, 3], 3, 1); // returns false</para>
/// <para>// Returned false because index 4 is out of range.</para>
/// <para></para>
/// <para>Move(doc, [0, 3, 1], 3, 2); // returns false</para>
/// <para>// Returned false because index 2 is out of range for 3 page indices.</para>
/// <para></para>
/// <para>Move(doc, [2, 2], 2, 0); // returns false</para>
/// <para>// Returned false because [2, 2] contains duplicates.</para>
/// </summary>
public static int FPDF_MovePages(global::PDFiumCore.FpdfDocumentT document, ref int page_indices, uint page_indices_len, int dest_page_index)
{
var __arg0 = document is null ? __IntPtr.Zero : document.__Instance;
fixed (int* __page_indices1 = &page_indices)
{
var __arg1 = __page_indices1;
var __ret = __Internal.FPDF_MovePages(__arg0, __arg1, page_indices_len, dest_page_index);
return __ret;
}
}

/// <summary>
/// <para>Get the rotation of |page|.</para>
/// <para>page - handle to a page</para>
Expand Down

0 comments on commit c52594b

Please sign in to comment.