JS to WASM Examples for direct FPDF* function calls
See original GitHub issue1# Is it possible to provide an example of bypassing the convenience functions defined in custom.cpp
such as this one: https://github.com/paulo-coutinho/pdfium-lib/blob/8fac2c1cc09e5465b9dbb0dcb3156622aa41555e/extras/wasm/utils/custom.cpp#L80 and calling FPDF*
functions directly from JavaScript instead?
Some issues such an example would help solve
- control
PDF_SCALE
for matching dimensions with other PDF renderers - skip
FPDFBitmap_FillRect
for a transparent canvas background - control
FPDF_RenderPageBitmap
for page rotation and size
2# How can we call functions that take FPDF_BYTESTRING
from JavaScript, such as this one? https://github.com/paulo-coutinho/pdfium-lib/blob/8fac2c1cc09e5465b9dbb0dcb3156622aa41555e/extras/wasm/utils/custom.cpp#L59
Some issues such an example would help solve
FPDF_LoadMemDocument(buffer, length, **password**)
become able to load password-protected PDF files
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Interacting with code — Emscripten 3.1.26-git (dev ...
Using direct function calls (faster but more complicated). Call compiled C++ classes from JavaScript using bindings created with: Embind or WebIDL-Binder.
Read more >memory alignment issue that only occurs with specific buffer ...
In a project compiled with emscripten (em++) to WASM, calls to a function with some image dimensions keep triggering memalign memset free ...
Read more >Importing Javascript Functions Into WebAssembly
In this example, we will import and implement a simple console.log which is called within Wasm. This example is inspired by the console_log...
Read more >Calling JavaScript code from C/C++ using WebAssembly
Today, we will be discussing how to call JavaScript code from C/C++ with and ... Here, we have passed the console.log function to...
Read more >sitemap-questions-34.xml - Stack Overflow
... .com/questions/99552/where-do-pure-virtual-function-call-crashes-come-from ... https://stackoverflow.com/questions/249467/what-is-a-simple-example-of- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Do you this code with rotation?
Anyway i put a new version with your code mixed with mine. It is nice there.
Thanks.
Hi @cetinsert, do you have any updates on
rotation
? It seems like it isn’t being used.