Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the latest PDFium 128.0.6611.0 release causes a load library error #151

Closed
nikessel opened this issue Jul 26, 2024 · 3 comments
Closed
Assignees

Comments

@nikessel
Copy link

Tested on arch linux using version 0.8.22 of pdfium-render, using the .so from the following tarball: /~https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F6611/pdfium-linux-x64.tgz

called `Result::unwrap()` on an `Err` value: LoadLibraryError(DlSym { desc: "./static/pdfium/libpdfium.so: undefined symbol: FPDFText_GetTextRenderMode" })

PDFium 128.0.6569.0 works just fine, so I've reverted to that version

@ajrcarey
Copy link
Owner

ajrcarey commented Aug 4, 2024

Hi @niklass-l , thank you for reporting the issue. I can reproduce the problem. It looks like FPDFText_GetTextRenderMode was removed from https://pdfium.googlesource.com/pdfium/+/refs/heads/main/public/fpdf_text.h, possibly related to https://groups.google.com/g/pdfium/c/vz-Ymq6IwZs?pli=1.

Synchronised bindings against Pdfium master. Removed FPDFText_GetTextRenderMode in favour of new FPDFText_GetTextObject. Added new PdfPageTextChar::text_object() function that uses FPDFText_GetTextObject. Updated implementation of PdfPageTextChar::render_mode() to use PdfPageTextChar::text_object(). Updated native, thread safe, and WASM bindings.

ajrcarey pushed a commit that referenced this issue Aug 4, 2024
ajrcarey pushed a commit that referenced this issue Aug 4, 2024
@ajrcarey
Copy link
Owner

ajrcarey commented Aug 4, 2024

Resolving the FPDFText_GetTextRenderMode issue reveals that it was not the only function removed from release 6611; several font functions were also changed. Addressed in #152.

@ajrcarey
Copy link
Owner

ajrcarey commented Aug 4, 2024

Updated README.md. Bumped crate version to 0.8.23. Updated github actions to include export LD_LIBRARY_PATH="./" in order to have automated build succeed.

The changes will be included in release 0.8.23. In the meantime, you can test the changes locally by taking pdfium-render as a git dependency in your Cargo.toml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants