Skip to content

Commit

Permalink
PDFium version v130.0.6679.0 chromium/6679 [master]
Browse files Browse the repository at this point in the history
*public static int FPDFBitmapFillRect(global::PDFiumCore.FpdfBitmapT bitmap, int left, int top, int width, int height, uint color)
+public static int FPDFCatalogSetLanguage(global::PDFiumCore.FpdfDocumentT document, string language)
+public static int FPDFPageObjTransformF(global::PDFiumCore.FpdfPageobjectT page_object, global::PDFiumCore.FS_MATRIX_ matrix)
+public static int FPDFPageObjGetMarkedContentID(global::PDFiumCore.FpdfPageobjectT page_object)
+public static ulong FPDFFontGetBaseFontName(global::PDFiumCore.FpdfFontT font, sbyte* buffer, ulong length)
+public static global::PDFiumCore.FpdfPageobjectT FPDFTextGetTextObject(global::PDFiumCore.FpdfTextpageT text_page, int index)
-public static global::PDFiumCore.FPDF_TEXT_RENDERMODE FPDFTextGetTextRenderMode(global::PDFiumCore.FpdfTextpageT text_page, int index)
  • Loading branch information
DJGosnell committed Aug 26, 2024
1 parent 7db6b29 commit ad7df2f
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 38 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 163323669 false
dotnet ./src/PDFiumCoreBindingsGenerator/bin/Release/net6.0/PDFiumCoreBindingsGenerator.dll 171884604 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>128.0.6569.0</Version>
<Version>130.0.6679.0</Version>
</PropertyGroup>
</Project>
151 changes: 115 additions & 36 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/6569
// Github release api https://api.github.com/repos/bblanchon/pdfium-binaries/releases/163323669
// PDFium version v128.0.6569.0 chromium/6569 [master]
// Built on: Mon, 01 Jul 2024 14:04:37 GMT
// Built from precompiled binaries at https://github.com/bblanchon/pdfium-binaries/releases/tag/chromium/6679
// Github release api https://api.github.com/repos/bblanchon/pdfium-binaries/releases/171884604
// PDFium version v130.0.6679.0 chromium/6679 [master]
// Built on: Mon, 26 Aug 2024 15:21:35 GMT
// ----------------------------------------------------------------------------
// <auto-generated>
// This is autogenerated code by CppSharp.
Expand Down Expand Up @@ -3312,7 +3312,7 @@ public partial struct __Internal
internal static extern int FPDFBitmapGetFormat(__IntPtr bitmap);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFBitmap_FillRect", CallingConvention = __CallingConvention.Cdecl)]
internal static extern void FPDFBitmapFillRect(__IntPtr bitmap, int left, int top, int width, int height, uint color);
internal static extern int FPDFBitmapFillRect(__IntPtr bitmap, int left, int top, int width, int height, uint color);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFBitmap_GetBuffer", CallingConvention = __CallingConvention.Cdecl)]
internal static extern __IntPtr FPDFBitmapGetBuffer(__IntPtr bitmap);
Expand Down Expand Up @@ -4021,15 +4021,16 @@ public static int FPDFBitmapGetFormat(global::PDFiumCore.FpdfBitmapT bitmap)
/// <para>height - Height in pixels to be filled.</para>
/// <para>color - A 32-bit value specifing the color, in 8888 ARGB format.</para>
/// <para>Return value:</para>
/// <para>None.</para>
/// <para>Returns whether the operation succeeded or not.</para>
/// <para>Comments: This function sets the color and (optionally) alpha value in the specified region of the bitmap.</para>
/// <para>NOTE: If the alpha channel is used, this function does NOT composite the background with the source color, instead the background will be replaced by the source color and the alpha.</para>
/// <para>If the alpha channel is not used, the alpha parameter is ignored.</para>
/// </summary>
public static void FPDFBitmapFillRect(global::PDFiumCore.FpdfBitmapT bitmap, int left, int top, int width, int height, uint color)
public static int FPDFBitmapFillRect(global::PDFiumCore.FpdfBitmapT bitmap, int left, int top, int width, int height, uint color)
{
var __arg0 = bitmap is null ? __IntPtr.Zero : bitmap.__Instance;
__Internal.FPDFBitmapFillRect(__arg0, left, top, width, height, color);
var __ret = __Internal.FPDFBitmapFillRect(__arg0, left, top, width, height, color);
return __ret;
}

/// <summary>
Expand Down Expand Up @@ -8076,6 +8077,9 @@ public partial struct __Internal
{
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFCatalog_IsTagged", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFCatalogIsTagged(__IntPtr document);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFCatalog_SetLanguage", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFCatalogSetLanguage(__IntPtr document, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CppSharp.Runtime.UTF8Marshaller))] string language);
}

/// <summary>
Expand All @@ -8092,6 +8096,20 @@ public static int FPDFCatalogIsTagged(global::PDFiumCore.FpdfDocumentT document)
var __ret = __Internal.FPDFCatalogIsTagged(__arg0);
return __ret;
}

/// <summary>
/// <para>Experimental API.</para>
/// <para>Sets the language of |document| to |language|.</para>
/// <para>document - handle to a document.</para>
/// <para>language - the language to set to.</para>
/// <para>Returns TRUE on success.</para>
/// </summary>
public static int FPDFCatalogSetLanguage(global::PDFiumCore.FpdfDocumentT document, string language)
{
var __arg0 = document is null ? __IntPtr.Zero : document.__Instance;
var __ret = __Internal.FPDFCatalogSetLanguage(__arg0, language);
return __ret;
}
}

public unsafe partial class FX_FILEAVAIL : IDisposable
Expand Down Expand Up @@ -9383,6 +9401,9 @@ public partial struct __Internal
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPageObj_Transform", CallingConvention = __CallingConvention.Cdecl)]
internal static extern void FPDFPageObjTransform(__IntPtr page_object, double a, double b, double c, double d, double e, double f);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPageObj_TransformF", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFPageObjTransformF(__IntPtr page_object, __IntPtr matrix);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPageObj_GetMatrix", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFPageObjGetMatrix(__IntPtr page_object, __IntPtr matrix);

Expand All @@ -9395,6 +9416,9 @@ public partial struct __Internal
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFPageObj_NewImageObj", CallingConvention = __CallingConvention.Cdecl)]
internal static extern __IntPtr FPDFPageObjNewImageObj(__IntPtr document);

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

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

Expand Down Expand Up @@ -9611,8 +9635,11 @@ public partial struct __Internal
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFTextObj_GetFont", CallingConvention = __CallingConvention.Cdecl)]
internal static extern __IntPtr FPDFTextObjGetFont(__IntPtr text);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFFont_GetFontName", CallingConvention = __CallingConvention.Cdecl)]
internal static extern uint FPDFFontGetFontName(__IntPtr font, sbyte* buffer, uint length);
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFFont_GetBaseFontName", CallingConvention = __CallingConvention.Cdecl)]
internal static extern ulong FPDFFontGetBaseFontName(__IntPtr font, sbyte* buffer, ulong length);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFFont_GetFamilyName", CallingConvention = __CallingConvention.Cdecl)]
internal static extern ulong FPDFFontGetFamilyName(__IntPtr font, sbyte* buffer, ulong length);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFFont_GetFontData", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFFontGetFontData(__IntPtr font, byte* buffer, ulong buflen, ulong* out_buflen);
Expand Down Expand Up @@ -9904,6 +9931,25 @@ public static void FPDFPageObjTransform(global::PDFiumCore.FpdfPageobjectT page_
__Internal.FPDFPageObjTransform(__arg0, a, b, c, d, e, f);
}

/// <summary>
/// <para>Experimental API.</para>
/// <para>Transform |page_object| by the given matrix.</para>
/// <para>page_object - handle to a page object.</para>
/// <para>matrix - the transform matrix.</para>
/// <para>Returns TRUE on success.</para>
/// <para>This can be used to scale, rotate, shear and translate the |page_object|.</para>
/// <para>It is an improved version of FPDFPageObj_Transform() that does not do</para>
/// <para>unnecessary double to float conversions, and only uses 1 parameter for the</para>
/// <para>matrix. It also returns whether the operation succeeded or not.</para>
/// </summary>
public static int FPDFPageObjTransformF(global::PDFiumCore.FpdfPageobjectT page_object, global::PDFiumCore.FS_MATRIX_ matrix)
{
var __arg0 = page_object is null ? __IntPtr.Zero : page_object.__Instance;
var __arg1 = matrix is null ? __IntPtr.Zero : matrix.__Instance;
var __ret = __Internal.FPDFPageObjTransformF(__arg0, __arg1);
return __ret;
}

/// <summary>
/// <para>Experimental API.</para>
/// <para>Get the transform matrix of a page object.</para>
Expand Down Expand Up @@ -9979,6 +10025,19 @@ public static void FPDFPageTransformAnnots(global::PDFiumCore.FpdfPageT page, do
return __result0;
}

/// <summary>
/// <para>Experimental API.</para>
/// <para>Get the marked content ID for the object.</para>
/// <para>page_object - handle to a page object.</para>
/// <para>Returns the page object's marked content ID, or -1 on error.</para>
/// </summary>
public static int FPDFPageObjGetMarkedContentID(global::PDFiumCore.FpdfPageobjectT page_object)
{
var __arg0 = page_object is null ? __IntPtr.Zero : page_object.__Instance;
var __ret = __Internal.FPDFPageObjGetMarkedContentID(__arg0);
return __ret;
}

/// <summary>
/// <para>Experimental API.</para>
/// <para>Get number of content marks in |page_object|.</para>
Expand Down Expand Up @@ -11293,20 +11352,40 @@ public static uint FPDFTextObjGetText(global::PDFiumCore.FpdfPageobjectT text_ob

/// <summary>
/// <para>Experimental API.</para>
/// <para>Get the font name of a font.</para>
/// <para>Get the base name of a font.</para>
/// <para>font - the handle to the font object.</para>
/// <para>buffer - the address of a buffer that receives the base font name.</para>
/// <para>length - the size, in bytes, of |buffer|.</para>
/// <para>Returns the number of bytes in the base name (including the trailing NUL</para>
/// <para>character) on success, 0 on error. The base name is typically the font's</para>
/// <para>PostScript name. See descriptions of &quot;BaseFont&quot; in ISO 32000-1:2008 spec.</para>
/// <para>Regardless of the platform, the |buffer| is always in UTF-8 encoding.</para>
/// <para>If |length| is less than the returned length, or |buffer| is NULL, |buffer|</para>
/// <para>will not be modified.</para>
/// </summary>
public static ulong FPDFFontGetBaseFontName(global::PDFiumCore.FpdfFontT font, sbyte* buffer, ulong length)
{
var __arg0 = font is null ? __IntPtr.Zero : font.__Instance;
var __ret = __Internal.FPDFFontGetBaseFontName(__arg0, buffer, length);
return __ret;
}

/// <summary>
/// <para>Experimental API.</para>
/// <para>Get the family name of a font.</para>
/// <para>font - the handle to the font object.</para>
/// <para>buffer - the address of a buffer that receives the font name.</para>
/// <para>length - the size, in bytes, of |buffer|.</para>
/// <para>Returns the number of bytes in the font name (including the trailing NUL</para>
/// <para>Returns the number of bytes in the family name (including the trailing NUL</para>
/// <para>character) on success, 0 on error.</para>
/// <para>Regardless of the platform, the |buffer| is always in UTF-8 encoding.</para>
/// <para>If |length| is less than the returned length, or |buffer| is NULL, |buffer|</para>
/// <para>will not be modified.</para>
/// </summary>
public static uint FPDFFontGetFontName(global::PDFiumCore.FpdfFontT font, sbyte* buffer, uint length)
public static ulong FPDFFontGetFamilyName(global::PDFiumCore.FpdfFontT font, sbyte* buffer, ulong length)
{
var __arg0 = font is null ? __IntPtr.Zero : font.__Instance;
var __ret = __Internal.FPDFFontGetFontName(__arg0, buffer, length);
var __ret = __Internal.FPDFFontGetFamilyName(__arg0, buffer, length);
return __ret;
}

Expand Down Expand Up @@ -13844,6 +13923,9 @@ public partial struct __Internal
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFText_GetUnicode", CallingConvention = __CallingConvention.Cdecl)]
internal static extern uint FPDFTextGetUnicode(__IntPtr text_page, int index);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFText_GetTextObject", CallingConvention = __CallingConvention.Cdecl)]
internal static extern __IntPtr FPDFTextGetTextObject(__IntPtr text_page, int index);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFText_IsGenerated", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFTextIsGenerated(__IntPtr text_page, int index);

Expand All @@ -13862,9 +13944,6 @@ public partial struct __Internal
[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFText_GetFontWeight", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFTextGetFontWeight(__IntPtr text_page, int index);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFText_GetTextRenderMode", CallingConvention = __CallingConvention.Cdecl)]
internal static extern global::PDFiumCore.FPDF_TEXT_RENDERMODE FPDFTextGetTextRenderMode(__IntPtr text_page, int index);

[SuppressUnmanagedCodeSecurity, DllImport("pdfium", EntryPoint = "FPDFText_GetFillColor", CallingConvention = __CallingConvention.Cdecl)]
internal static extern int FPDFTextGetFillColor(__IntPtr text_page, int index, uint* R, uint* G, uint* B, uint* A);

Expand Down Expand Up @@ -14011,6 +14090,25 @@ public static uint FPDFTextGetUnicode(global::PDFiumCore.FpdfTextpageT text_page
return __ret;
}

/// <summary>
/// <para>Function: FPDFText_GetTextObject</para>
/// <para>Get the FPDF_PAGEOBJECT associated with a given character.</para>
/// <para>Parameters:</para>
/// <para>text_page - Handle to a text page information structure. Returned by FPDFText_LoadPage function.</para>
/// <para>index - Zero-based index of the character.</para>
/// <para>Return value:</para>
/// <para>The associated text object for the character at |index|, or NULL on</para>
/// <para>error. The returned text object, if non-null, is of type</para>
/// <para>|FPDF_PAGEOBJ_TEXT|. The caller does not own the returned object.</para>
/// </summary>
public static global::PDFiumCore.FpdfPageobjectT FPDFTextGetTextObject(global::PDFiumCore.FpdfTextpageT text_page, int index)
{
var __arg0 = text_page is null ? __IntPtr.Zero : text_page.__Instance;
var __ret = __Internal.FPDFTextGetTextObject(__arg0, index);
var __result0 = global::PDFiumCore.FpdfPageobjectT.__GetOrCreateInstance(__ret, false);
return __result0;
}

/// <summary>
/// <para>Function: FPDFText_IsGenerated</para>
/// <para>Get if a character in a page is generated by PDFium.</para>
Expand Down Expand Up @@ -14128,25 +14226,6 @@ public static int FPDFTextGetFontWeight(global::PDFiumCore.FpdfTextpageT text_pa
return __ret;
}

/// <summary>
/// <para>Function: FPDFText_GetTextRenderMode</para>
/// <para>Get text rendering mode of character.</para>
/// <para>Parameters:</para>
/// <para>text_page - Handle to a text page information structure. Returned by FPDFText_LoadPage function.</para>
/// <para>index - Zero-based index of the character.</para>
/// <para>Return Value:</para>
/// <para>On success, return the render mode value. A valid value is of type</para>
/// <para>FPDF_TEXT_RENDERMODE. If |text_page| is invalid, if |index| is out</para>
/// <para>of bounds, or if the text object is undefined, then return</para>
/// <para>FPDF_TEXTRENDERMODE_UNKNOWN.</para>
/// </summary>
public static global::PDFiumCore.FPDF_TEXT_RENDERMODE FPDFTextGetTextRenderMode(global::PDFiumCore.FpdfTextpageT text_page, int index)
{
var __arg0 = text_page is null ? __IntPtr.Zero : text_page.__Instance;
var __ret = __Internal.FPDFTextGetTextRenderMode(__arg0, index);
return __ret;
}

/// <summary>
/// <para>Function: FPDFText_GetFillColor</para>
/// <para>Get the fill color of a particular character.</para>
Expand Down

0 comments on commit ad7df2f

Please sign in to comment.