diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4fedeff..bc0be2d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -22,9 +22,9 @@ jobs: submodules: true - name: Install .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.* + dotnet-version: 8.0.* source-url: https://api.nuget.org/v3/index.json env: NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/download_package.sh b/download_package.sh index c17e9f0..14cd218 100755 --- a/download_package.sh +++ b/download_package.sh @@ -1,2 +1,2 @@ dotnet build src/PDFiumCoreBindingsGenerator/PDFiumCoreBindingsGenerator.csproj -c Release -dotnet ./src/PDFiumCoreBindingsGenerator/bin/Release/net6.0/PDFiumCoreBindingsGenerator.dll 186238511 false +dotnet ./src/PDFiumCoreBindingsGenerator/bin/Release/net6.0/PDFiumCoreBindingsGenerator.dll 196869661 false diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 438fbea..e87850f 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - 133.0.6844.0 + 134.0.6982.0 diff --git a/src/PDFiumCore/PDFiumCore.cs b/src/PDFiumCore/PDFiumCore.cs index 6162b2c..92f320f 100644 --- a/src/PDFiumCore/PDFiumCore.cs +++ b/src/PDFiumCore/PDFiumCore.cs @@ -1,7 +1,7 @@ -// Built from precompiled binaries at https://github.com/bblanchon/pdfium-binaries/releases/tag/chromium/6844 -// Github release api https://api.github.com/repos/bblanchon/pdfium-binaries/releases/186238511 -// PDFium version v133.0.6844.0 chromium/6844 [master] -// Built on: Tue, 26 Nov 2024 17:05:22 GMT +// Built from precompiled binaries at https://github.com/bblanchon/pdfium-binaries/releases/tag/chromium/6982 +// Github release api https://api.github.com/repos/bblanchon/pdfium-binaries/releases/196869661 +// PDFium version v134.0.6982.0 chromium/6982 [master] +// Built on: Wed, 29 Jan 2025 14:45:54 GMT // ---------------------------------------------------------------------------- // // This is autogenerated code by CppSharp. @@ -9398,6 +9398,9 @@ public partial struct __Internal [SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPageObj_GetType", CallingConvention = __CallingConvention.Cdecl)] internal static extern int FPDFPageObjGetType(__IntPtr page_object); + [SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPageObj_GetIsActive", CallingConvention = __CallingConvention.Cdecl)] + internal static extern int FPDFPageObjGetIsActive(__IntPtr page_object, int* active); + [SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPageObj_SetIsActive", CallingConvention = __CallingConvention.Cdecl)] internal static extern int FPDFPageObjSetIsActive(__IntPtr page_object, int active); @@ -9503,6 +9506,9 @@ public partial struct __Internal [SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFImageObj_GetImagePixelSize", CallingConvention = __CallingConvention.Cdecl)] internal static extern int FPDFImageObjGetImagePixelSize(__IntPtr image_object, uint* width, uint* height); + [SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFImageObj_GetIccProfileDataDecoded", CallingConvention = __CallingConvention.Cdecl)] + internal static extern int FPDFImageObjGetIccProfileDataDecoded(__IntPtr image_object, __IntPtr page, byte* buffer, ulong buflen, ulong* out_buflen); + [SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPageObj_CreateNewPath", CallingConvention = __CallingConvention.Cdecl)] internal static extern __IntPtr FPDFPageObjCreateNewPath(float x, float y); @@ -9914,6 +9920,29 @@ public static int FPDFPageObjGetType(global::PDFiumCore.FpdfPageobjectT page_obj return __ret; } + /// + /// Experimental API. + /// Gets active state for |page_object| within page. + /// page_object - handle to a page object. + /// active - pointer to variable that will receive if the page object is + /// active. This is a required parameter. Not filled if FALSE + /// is returned. + /// For page objects where |active| is filled with FALSE, the |page_object| is + /// treated as if it wasn't in the document even though it is still held + /// internally. + /// Returns TRUE if the operation succeeded, FALSE if it failed. + /// + public static int FPDFPageObjGetIsActive(global::PDFiumCore.FpdfPageobjectT page_object, ref int active) + { + var __arg0 = page_object is null ? __IntPtr.Zero : page_object.__Instance; + fixed (int* __active1 = &active) + { + var __arg1 = __active1; + var __ret = __Internal.FPDFPageObjGetIsActive(__arg0, __arg1); + return __ret; + } + } + /// /// Experimental API. /// Sets if |page_object| is active within page. @@ -10605,6 +10634,36 @@ public static int FPDFImageObjGetImagePixelSize(global::PDFiumCore.FpdfPageobjec } } + /// + /// Experimental API. + /// Get ICC profile decoded data of |image_object|. If the |image_object| is not + /// an image object or if it does not have an image, then the return value will + /// be false. It also returns false if the |image_object| has no ICC profile. + /// |buffer| is only modified if ICC profile exists and |buflen| is longer than + /// the length of the ICC profile decoded data. + /// image_object - handle to an image object; must not be NULL. + /// page - handle to the page containing |image_object|; must not be + /// NULL. Required for retrieving the image's colorspace. + /// buffer - Buffer to receive ICC profile data; may be NULL if querying + /// required size via |out_buflen|. + /// buflen - Length of the buffer in bytes. Ignored if |buffer| is NULL. + /// out_buflen - Pointer to receive the ICC profile data size in bytes; must + /// not be NULL. Will be set if this API returns true. + /// Returns true if |out_buflen| is not null and an ICC profile exists for the + /// given |image_object|. + /// + public static int FPDFImageObjGetIccProfileDataDecoded(global::PDFiumCore.FpdfPageobjectT image_object, global::PDFiumCore.FpdfPageT page, byte* buffer, ulong buflen, ref ulong out_buflen) + { + var __arg0 = image_object is null ? __IntPtr.Zero : image_object.__Instance; + var __arg1 = page is null ? __IntPtr.Zero : page.__Instance; + fixed (ulong* __out_buflen4 = &out_buflen) + { + var __arg4 = __out_buflen4; + var __ret = __Internal.FPDFImageObjGetIccProfileDataDecoded(__arg0, __arg1, buffer, buflen, __arg4); + return __ret; + } + } + /// /// Create a new path object at an initial position. /// x - initial horizontal position.