Skip to content

Commit

Permalink
[autorelease] update changelog and version file
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Aug 28, 2023
1 parent df73327 commit 96065fc
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 84 deletions.
147 changes: 69 additions & 78 deletions bindings/raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ def _get_ptrdiff_t():
c_ptrdiff_t = _get_ptrdiff_t()


# As of ctypes 1.0, ctypes does not support custom error-checking
# functions on callbacks, nor does it support custom datatypes on
# callbacks, so we must ensure that all callbacks return
# primitive datatypes.
#
# Non-primitive return values wrapped with UNCHECKED won't be
# typechecked, and will be converted to ctypes.c_void_p.
def UNCHECKED(type):
if hasattr(type, "_type_") and isinstance(type._type_, str) and type._type_ != "P":
return type
else:
return ctypes.c_void_p


# ctypes doesn't have direct support for variadic functions, so we have to write
# our own wrapper class
class _variadic_function(object):
Expand Down Expand Up @@ -812,7 +798,7 @@ class struct_anon_4(Structure):
]
struct_anon_4._fields_ = [
('m_FileLen', c_ulong),
('m_GetBlock', CFUNCTYPE(UNCHECKED(c_int), POINTER(None), c_ulong, POINTER(c_ubyte), c_ulong)),
('m_GetBlock', CFUNCTYPE(c_int, POINTER(None), c_ulong, POINTER(c_ubyte), c_ulong)),
('m_Param', POINTER(None)),
]
FPDF_FILEACCESS = struct_anon_4
Expand All @@ -830,12 +816,12 @@ class struct_FPDF_FILEHANDLER_(Structure):
]
struct_FPDF_FILEHANDLER_._fields_ = [
('clientData', POINTER(None)),
('Release', CFUNCTYPE(UNCHECKED(None), POINTER(None))),
('GetSize', CFUNCTYPE(UNCHECKED(FPDF_DWORD), POINTER(None))),
('ReadBlock', CFUNCTYPE(UNCHECKED(FPDF_RESULT), POINTER(None), FPDF_DWORD, POINTER(None), FPDF_DWORD)),
('WriteBlock', CFUNCTYPE(UNCHECKED(FPDF_RESULT), POINTER(None), FPDF_DWORD, POINTER(None), FPDF_DWORD)),
('Flush', CFUNCTYPE(UNCHECKED(FPDF_RESULT), POINTER(None))),
('Truncate', CFUNCTYPE(UNCHECKED(FPDF_RESULT), POINTER(None), FPDF_DWORD)),
('Release', CFUNCTYPE(None, POINTER(None))),
('GetSize', CFUNCTYPE(FPDF_DWORD, POINTER(None))),
('ReadBlock', CFUNCTYPE(FPDF_RESULT, POINTER(None), FPDF_DWORD, POINTER(None), FPDF_DWORD)),
('WriteBlock', CFUNCTYPE(FPDF_RESULT, POINTER(None), FPDF_DWORD, POINTER(None), FPDF_DWORD)),
('Flush', CFUNCTYPE(FPDF_RESULT, POINTER(None))),
('Truncate', CFUNCTYPE(FPDF_RESULT, POINTER(None), FPDF_DWORD)),
]
FPDF_FILEHANDLER = struct_FPDF_FILEHANDLER_

Expand Down Expand Up @@ -1095,21 +1081,21 @@ class struct__IPDF_JsPlatform(Structure):
]
struct__IPDF_JsPlatform._fields_ = [
('version', c_int),
('app_alert', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__IPDF_JsPlatform), FPDF_WIDESTRING, FPDF_WIDESTRING, c_int, c_int)),
('app_beep', CFUNCTYPE(UNCHECKED(None), POINTER(struct__IPDF_JsPlatform), c_int)),
('app_response', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__IPDF_JsPlatform), FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_BOOL, POINTER(None), c_int)),
('Doc_getFilePath', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__IPDF_JsPlatform), POINTER(None), c_int)),
('Doc_mail', CFUNCTYPE(UNCHECKED(None), POINTER(struct__IPDF_JsPlatform), POINTER(None), c_int, FPDF_BOOL, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING)),
('Doc_print', CFUNCTYPE(UNCHECKED(None), POINTER(struct__IPDF_JsPlatform), FPDF_BOOL, c_int, c_int, FPDF_BOOL, FPDF_BOOL, FPDF_BOOL, FPDF_BOOL, FPDF_BOOL)),
('Doc_submitForm', CFUNCTYPE(UNCHECKED(None), POINTER(struct__IPDF_JsPlatform), POINTER(None), c_int, FPDF_WIDESTRING)),
('Doc_gotoPage', CFUNCTYPE(UNCHECKED(None), POINTER(struct__IPDF_JsPlatform), c_int)),
('Field_browse', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__IPDF_JsPlatform), POINTER(None), c_int)),
('app_alert', CFUNCTYPE(c_int, POINTER(struct__IPDF_JsPlatform), FPDF_WIDESTRING, FPDF_WIDESTRING, c_int, c_int)),
('app_beep', CFUNCTYPE(None, POINTER(struct__IPDF_JsPlatform), c_int)),
('app_response', CFUNCTYPE(c_int, POINTER(struct__IPDF_JsPlatform), FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_BOOL, POINTER(None), c_int)),
('Doc_getFilePath', CFUNCTYPE(c_int, POINTER(struct__IPDF_JsPlatform), POINTER(None), c_int)),
('Doc_mail', CFUNCTYPE(None, POINTER(struct__IPDF_JsPlatform), POINTER(None), c_int, FPDF_BOOL, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING)),
('Doc_print', CFUNCTYPE(None, POINTER(struct__IPDF_JsPlatform), FPDF_BOOL, c_int, c_int, FPDF_BOOL, FPDF_BOOL, FPDF_BOOL, FPDF_BOOL, FPDF_BOOL)),
('Doc_submitForm', CFUNCTYPE(None, POINTER(struct__IPDF_JsPlatform), POINTER(None), c_int, FPDF_WIDESTRING)),
('Doc_gotoPage', CFUNCTYPE(None, POINTER(struct__IPDF_JsPlatform), c_int)),
('Field_browse', CFUNCTYPE(c_int, POINTER(struct__IPDF_JsPlatform), POINTER(None), c_int)),
('m_pFormfillinfo', POINTER(None)),
('m_isolate', POINTER(None)),
('m_v8EmbedderSlot', c_uint),
]
IPDF_JSPLATFORM = struct__IPDF_JsPlatform
TimerCallback = CFUNCTYPE(UNCHECKED(None), c_int)
TimerCallback = CFUNCTYPE(None, c_int)

class struct__FPDF_SYSTEMTIME(Structure):
pass
Expand Down Expand Up @@ -1176,40 +1162,40 @@ class struct__FPDF_FORMFILLINFO(Structure):
]
struct__FPDF_FORMFILLINFO._fields_ = [
('version', c_int),
('Release', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO))),
('FFI_Invalidate', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, c_double, c_double, c_double, c_double)),
('FFI_OutputSelectedRect', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, c_double, c_double, c_double, c_double)),
('FFI_SetCursor', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), c_int)),
('FFI_SetTimer', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__FPDF_FORMFILLINFO), c_int, TimerCallback)),
('FFI_KillTimer', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), c_int)),
('FFI_GetLocalTime', CFUNCTYPE(UNCHECKED(FPDF_SYSTEMTIME), POINTER(struct__FPDF_FORMFILLINFO))),
('FFI_OnChange', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO))),
('FFI_GetPage', CFUNCTYPE(UNCHECKED(FPDF_PAGE), POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT, c_int)),
('FFI_GetCurrentPage', CFUNCTYPE(UNCHECKED(FPDF_PAGE), POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT)),
('FFI_GetRotation', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE)),
('FFI_ExecuteNamedAction', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_BYTESTRING)),
('FFI_SetTextFieldFocus', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_WIDESTRING, FPDF_DWORD, FPDF_BOOL)),
('FFI_DoURIAction', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_BYTESTRING)),
('FFI_DoGoToAction', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), c_int, c_int, POINTER(c_float), c_int)),
('Release', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO))),
('FFI_Invalidate', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, c_double, c_double, c_double, c_double)),
('FFI_OutputSelectedRect', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, c_double, c_double, c_double, c_double)),
('FFI_SetCursor', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), c_int)),
('FFI_SetTimer', CFUNCTYPE(c_int, POINTER(struct__FPDF_FORMFILLINFO), c_int, TimerCallback)),
('FFI_KillTimer', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), c_int)),
('FFI_GetLocalTime', CFUNCTYPE(FPDF_SYSTEMTIME, POINTER(struct__FPDF_FORMFILLINFO))),
('FFI_OnChange', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO))),
('FFI_GetPage', CFUNCTYPE(FPDF_PAGE, POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT, c_int)),
('FFI_GetCurrentPage', CFUNCTYPE(FPDF_PAGE, POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT)),
('FFI_GetRotation', CFUNCTYPE(c_int, POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE)),
('FFI_ExecuteNamedAction', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_BYTESTRING)),
('FFI_SetTextFieldFocus', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_WIDESTRING, FPDF_DWORD, FPDF_BOOL)),
('FFI_DoURIAction', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_BYTESTRING)),
('FFI_DoGoToAction', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), c_int, c_int, POINTER(c_float), c_int)),
('m_pJsPlatform', POINTER(IPDF_JSPLATFORM)),
('xfa_disabled', FPDF_BOOL),
('FFI_DisplayCaret', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, FPDF_BOOL, c_double, c_double, c_double, c_double)),
('FFI_GetCurrentPageIndex', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT)),
('FFI_SetCurrentPage', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT, c_int)),
('FFI_GotoURL', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT, FPDF_WIDESTRING)),
('FFI_GetPageViewRect', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double))),
('FFI_PageEvent', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), c_int, FPDF_DWORD)),
('FFI_PopupMenu', CFUNCTYPE(UNCHECKED(FPDF_BOOL), POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, FPDF_WIDGET, c_int, c_float, c_float)),
('FFI_OpenFile', CFUNCTYPE(UNCHECKED(POINTER(FPDF_FILEHANDLER)), POINTER(struct__FPDF_FORMFILLINFO), c_int, FPDF_WIDESTRING, POINTER(c_char))),
('FFI_EmailTo', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), POINTER(FPDF_FILEHANDLER), FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING)),
('FFI_UploadTo', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), POINTER(FPDF_FILEHANDLER), c_int, FPDF_WIDESTRING)),
('FFI_GetPlatform', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__FPDF_FORMFILLINFO), POINTER(None), c_int)),
('FFI_GetLanguage', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__FPDF_FORMFILLINFO), POINTER(None), c_int)),
('FFI_DownloadFromURL', CFUNCTYPE(UNCHECKED(POINTER(FPDF_FILEHANDLER)), POINTER(struct__FPDF_FORMFILLINFO), FPDF_WIDESTRING)),
('FFI_PostRequestURL', CFUNCTYPE(UNCHECKED(FPDF_BOOL), POINTER(struct__FPDF_FORMFILLINFO), FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, POINTER(FPDF_BSTR))),
('FFI_PutRequestURL', CFUNCTYPE(UNCHECKED(FPDF_BOOL), POINTER(struct__FPDF_FORMFILLINFO), FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING)),
('FFI_OnFocusChange', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_ANNOTATION, c_int)),
('FFI_DoURIActionWithKeyboardModifier', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_FORMFILLINFO), FPDF_BYTESTRING, c_int)),
('FFI_DisplayCaret', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, FPDF_BOOL, c_double, c_double, c_double, c_double)),
('FFI_GetCurrentPageIndex', CFUNCTYPE(c_int, POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT)),
('FFI_SetCurrentPage', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT, c_int)),
('FFI_GotoURL', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_DOCUMENT, FPDF_WIDESTRING)),
('FFI_GetPageViewRect', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, POINTER(c_double), POINTER(c_double), POINTER(c_double), POINTER(c_double))),
('FFI_PageEvent', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), c_int, FPDF_DWORD)),
('FFI_PopupMenu', CFUNCTYPE(FPDF_BOOL, POINTER(struct__FPDF_FORMFILLINFO), FPDF_PAGE, FPDF_WIDGET, c_int, c_float, c_float)),
('FFI_OpenFile', CFUNCTYPE(POINTER(FPDF_FILEHANDLER), POINTER(struct__FPDF_FORMFILLINFO), c_int, FPDF_WIDESTRING, POINTER(c_char))),
('FFI_EmailTo', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), POINTER(FPDF_FILEHANDLER), FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING)),
('FFI_UploadTo', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), POINTER(FPDF_FILEHANDLER), c_int, FPDF_WIDESTRING)),
('FFI_GetPlatform', CFUNCTYPE(c_int, POINTER(struct__FPDF_FORMFILLINFO), POINTER(None), c_int)),
('FFI_GetLanguage', CFUNCTYPE(c_int, POINTER(struct__FPDF_FORMFILLINFO), POINTER(None), c_int)),
('FFI_DownloadFromURL', CFUNCTYPE(POINTER(FPDF_FILEHANDLER), POINTER(struct__FPDF_FORMFILLINFO), FPDF_WIDESTRING)),
('FFI_PostRequestURL', CFUNCTYPE(FPDF_BOOL, POINTER(struct__FPDF_FORMFILLINFO), FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING, POINTER(FPDF_BSTR))),
('FFI_PutRequestURL', CFUNCTYPE(FPDF_BOOL, POINTER(struct__FPDF_FORMFILLINFO), FPDF_WIDESTRING, FPDF_WIDESTRING, FPDF_WIDESTRING)),
('FFI_OnFocusChange', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_ANNOTATION, c_int)),
('FFI_DoURIActionWithKeyboardModifier', CFUNCTYPE(None, POINTER(struct__FPDF_FORMFILLINFO), FPDF_BYTESTRING, c_int)),
]
FPDF_FORMFILLINFO = struct__FPDF_FORMFILLINFO

Expand Down Expand Up @@ -1795,7 +1781,7 @@ class struct__FX_FILEAVAIL(Structure):
]
struct__FX_FILEAVAIL._fields_ = [
('version', c_int),
('IsDataAvail', CFUNCTYPE(UNCHECKED(FPDF_BOOL), POINTER(struct__FX_FILEAVAIL), c_size_t, c_size_t)),
('IsDataAvail', CFUNCTYPE(FPDF_BOOL, POINTER(struct__FX_FILEAVAIL), c_size_t, c_size_t)),
]
FX_FILEAVAIL = struct__FX_FILEAVAIL

Expand All @@ -1817,7 +1803,7 @@ class struct__FX_DOWNLOADHINTS(Structure):
]
struct__FX_DOWNLOADHINTS._fields_ = [
('version', c_int),
('AddSegment', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FX_DOWNLOADHINTS), c_size_t, c_size_t)),
('AddSegment', CFUNCTYPE(None, POINTER(struct__FX_DOWNLOADHINTS), c_size_t, c_size_t)),
]
FX_DOWNLOADHINTS = struct__FX_DOWNLOADHINTS

Expand Down Expand Up @@ -2577,7 +2563,7 @@ class struct__UNSUPPORT_INFO(Structure):
]
struct__UNSUPPORT_INFO._fields_ = [
('version', c_int),
('FSDK_UnSupport_Handler', CFUNCTYPE(UNCHECKED(None), POINTER(struct__UNSUPPORT_INFO), c_int)),
('FSDK_UnSupport_Handler', CFUNCTYPE(None, POINTER(struct__UNSUPPORT_INFO), c_int)),
]
UNSUPPORT_INFO = struct__UNSUPPORT_INFO

Expand All @@ -2588,12 +2574,12 @@ class struct__UNSUPPORT_INFO(Structure):

if _libs["pdfium"].has("FSDK_SetTimeFunction", "cdecl"):
FSDK_SetTimeFunction = _libs["pdfium"].get("FSDK_SetTimeFunction", "cdecl")
FSDK_SetTimeFunction.argtypes = [CFUNCTYPE(UNCHECKED(time_t), )]
FSDK_SetTimeFunction.argtypes = [CFUNCTYPE(time_t, )]
FSDK_SetTimeFunction.restype = None

if _libs["pdfium"].has("FSDK_SetLocaltimeFunction", "cdecl"):
FSDK_SetLocaltimeFunction = _libs["pdfium"].get("FSDK_SetLocaltimeFunction", "cdecl")
FSDK_SetLocaltimeFunction.argtypes = [CFUNCTYPE(UNCHECKED(POINTER(struct_tm)), POINTER(time_t))]
FSDK_SetLocaltimeFunction.argtypes = [CFUNCTYPE(POINTER(struct_tm), POINTER(time_t))]
FSDK_SetLocaltimeFunction.restype = None

if _libs["pdfium"].has("FPDFDoc_GetPageMode", "cdecl"):
Expand Down Expand Up @@ -2857,7 +2843,7 @@ class struct__IFSDK_PAUSE(Structure):
]
struct__IFSDK_PAUSE._fields_ = [
('version', c_int),
('NeedToPauseNow', CFUNCTYPE(UNCHECKED(FPDF_BOOL), POINTER(struct__IFSDK_PAUSE))),
('NeedToPauseNow', CFUNCTYPE(FPDF_BOOL, POINTER(struct__IFSDK_PAUSE))),
('user', POINTER(None)),
]
IFSDK_PAUSE = struct__IFSDK_PAUSE
Expand Down Expand Up @@ -2890,7 +2876,7 @@ class struct_FPDF_FILEWRITE_(Structure):
]
struct_FPDF_FILEWRITE_._fields_ = [
('version', c_int),
('WriteBlock', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct_FPDF_FILEWRITE_), POINTER(None), c_ulong)),
('WriteBlock', CFUNCTYPE(c_int, POINTER(struct_FPDF_FILEWRITE_), POINTER(None), c_ulong)),
]
FPDF_FILEWRITE = struct_FPDF_FILEWRITE_

Expand Down Expand Up @@ -3104,14 +3090,14 @@ class struct__FPDF_SYSFONTINFO(Structure):
]
struct__FPDF_SYSFONTINFO._fields_ = [
('version', c_int),
('Release', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_SYSFONTINFO))),
('EnumFonts', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_SYSFONTINFO), POINTER(None))),
('MapFont', CFUNCTYPE(UNCHECKED(POINTER(c_ubyte)), POINTER(struct__FPDF_SYSFONTINFO), c_int, FPDF_BOOL, c_int, c_int, POINTER(c_char), POINTER(FPDF_BOOL))),
('GetFont', CFUNCTYPE(UNCHECKED(POINTER(c_ubyte)), POINTER(struct__FPDF_SYSFONTINFO), POINTER(c_char))),
('GetFontData', CFUNCTYPE(UNCHECKED(c_ulong), POINTER(struct__FPDF_SYSFONTINFO), POINTER(None), c_uint, POINTER(c_ubyte), c_ulong)),
('GetFaceName', CFUNCTYPE(UNCHECKED(c_ulong), POINTER(struct__FPDF_SYSFONTINFO), POINTER(None), POINTER(c_char), c_ulong)),
('GetFontCharset', CFUNCTYPE(UNCHECKED(c_int), POINTER(struct__FPDF_SYSFONTINFO), POINTER(None))),
('DeleteFont', CFUNCTYPE(UNCHECKED(None), POINTER(struct__FPDF_SYSFONTINFO), POINTER(None))),
('Release', CFUNCTYPE(None, POINTER(struct__FPDF_SYSFONTINFO))),
('EnumFonts', CFUNCTYPE(None, POINTER(struct__FPDF_SYSFONTINFO), POINTER(None))),
('MapFont', CFUNCTYPE(POINTER(c_ubyte), POINTER(struct__FPDF_SYSFONTINFO), c_int, FPDF_BOOL, c_int, c_int, POINTER(c_char), POINTER(FPDF_BOOL))),
('GetFont', CFUNCTYPE(POINTER(c_ubyte), POINTER(struct__FPDF_SYSFONTINFO), POINTER(c_char))),
('GetFontData', CFUNCTYPE(c_ulong, POINTER(struct__FPDF_SYSFONTINFO), POINTER(None), c_uint, POINTER(c_ubyte), c_ulong)),
('GetFaceName', CFUNCTYPE(c_ulong, POINTER(struct__FPDF_SYSFONTINFO), POINTER(None), POINTER(c_char), c_ulong)),
('GetFontCharset', CFUNCTYPE(c_int, POINTER(struct__FPDF_SYSFONTINFO), POINTER(None))),
('DeleteFont', CFUNCTYPE(None, POINTER(struct__FPDF_SYSFONTINFO), POINTER(None))),
]
FPDF_SYSFONTINFO = struct__FPDF_SYSFONTINFO

Expand Down Expand Up @@ -3177,6 +3163,11 @@ class struct_FPDF_CharsetFontMap_(Structure):
FPDFText_IsGenerated.argtypes = [FPDF_TEXTPAGE, c_int]
FPDFText_IsGenerated.restype = c_int

if _libs["pdfium"].has("FPDFText_IsHyphen", "cdecl"):
FPDFText_IsHyphen = _libs["pdfium"].get("FPDFText_IsHyphen", "cdecl")
FPDFText_IsHyphen.argtypes = [FPDF_TEXTPAGE, c_int]
FPDFText_IsHyphen.restype = c_int

if _libs["pdfium"].has("FPDFText_HasUnicodeMapError", "cdecl"):
FPDFText_HasUnicodeMapError = _libs["pdfium"].get("FPDFText_HasUnicodeMapError", "cdecl")
FPDFText_HasUnicodeMapError.argtypes = [FPDF_TEXTPAGE, c_int]
Expand Down
9 changes: 9 additions & 0 deletions docs/devel/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
# Changelog


## 4.19.0 (2023-08-28)

- Updated PDFium from `5868` to `5975`.
- Reset main branch to stable and shifted v5 development to a branch, so that pdfium updates (and possibly bug fixes) can still be handled.
v5 development is delayed and unexpectedly tough, so this seemed necessary.
The automated schedule has been slowed down from weekly to monthly for the time being.
Further manual releases may be triggered as necessary.


## 4.18.0 (2023-07-04)

- Updated PDFium from `5854` to `5868`.
Expand Down
4 changes: 0 additions & 4 deletions docs/devel/changelog_staging.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@
<!-- List character: dash (-) -->

# Changelog for next release
- Reset main branch to stable and shifted v5 development to a branch, so that pdfium updates (and possibly bug fixes) can still be handled.
v5 development is delayed and unexpectedly tough, so this seemed necessary.
The automated schedule has been slowed down from weekly to monthly for the time being.
Further manual releases may be triggered as necessary.
4 changes: 2 additions & 2 deletions src/pypdfium2/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__all__ = ("V_PYPDFIUM2", "V_LIBPDFIUM", "V_BUILDNAME", "V_PDFIUM_IS_V8")

V_MAJOR = 4
V_MINOR = 18
V_MINOR = 19
V_PATCH = 0
V_BETA = None

Expand All @@ -14,7 +14,7 @@
V_PYPDFIUM2 += f"b{V_BETA}"

#: PDFium library version string (git tag or commit hash)
V_LIBPDFIUM = "5868"
V_LIBPDFIUM = "5975"

#: String describing the included PDFium binary's origin (pdfium-binaries, source)
V_BUILDNAME = "pdfium-binaries"
Expand Down

0 comments on commit 96065fc

Please sign in to comment.