deepin-pdfium: API brekage compared to original pdfium #11473
Replies: 3 comments 1 reply
-
Also, it raises questions how the file lists should be updated when switching to a newer pdfium. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your attention. We are sorting out this code and will optimize it later. API compatibility has always been an issue we are concerned about, and we will deal with it later. |
Beta Was this translation helpful? Give feedback.
-
Here's my understanding of why we bundled an old PDFium version: The main reason was probably that Deepin's repo didn't have a proper PDFium package back then. Bundling it made building easier, but now we're stuck with this outdated version. We've got a couple options to fix this: Make an official PDFium package for Deepin's repo |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
pypdfium2 developer here. I'm interested in deepin-pdfium's portable CMake build system, but noticed there is some (unnecessary) API breakage compared to the original pdfium:
On the
FPDF_RenderPageBitmap()
API, two new parameterssrc_size_w
andsrc_size_h
have been added.I presume the objective here was to facilitate cropping, but note that you can already achieve this with the original API by shifting
start_x, start_y
into negative coords and settingsize_x, size_y
to the target size. So adding these extra parameters is actually unnecessary, and you could instead handle this on the caller side indpdfpage.cpp
.I would prefer if deeping-pdfium could remain API compatible to the original. This way, it'll also be easier for you to update pdfium.1
BTW: The resulting binary is much larger than when built with pdfium's original build system (17.5 vs 5.5 MiB for the shared library). Further, some APIs are missing in the build:
FPDFBookmark_GetCount()
,FPDFImageObj_GetImagePixelSize()
,FPDFPageObj_GetRotatedBounds()
,FPDF_ImportPagesByIndex()
,FPDFPageObj_SetMatrix()
,FPDF_NewXObjectFromPage()
. Perhaps this is simply because the pdfium version bundled here is outdated.Footnotes
Unless your intent is to fork off pdfium completely, but then you'll likely end up stuck with an outdated codebase that lacks upstream fixes and improvements. ↩
Beta Was this translation helpful? Give feedback.
All reactions