Comments (5)
as a side note, i guess this regression could be caught with a CI pipeline that also check for wasm32 target compilation
from printpdf.
i also tried without js-sys as i saw it is optional, but i got this new build error:
cargo run --example image --release --features embedded_images --target=wasm32-unknown-unknown --no-default-features
Compiling printpdf v0.7.0 (/home/hubert/Documents/corners_ws/printpdf)
error[E0599]: no method named `offset` found for reference `&unix_epoch_stub_date::OffsetDateTime` in the current scope
--> src/document_info.rs:104:23
|
104 | let offset = date.offset();
| ^^^^^^ method not found in `&OffsetDateTime`
error[E0277]: the trait bound `u8: From<u32>` is not satisfied
--> src/document_info.rs:109:9
|
109 | u8::from(date.month()),
| ^^ the trait `From<u32>` is not implemented for `u8`
|
= help: the following other types implement trait `From<T>`:
<u8 as From<bool>>
<u8 as From<deranged::ranged_u8::RangedU8<MIN, MAX>>>
<u8 as From<time::month::Month>>
<u8 as From<NonZeroU8>>
from printpdf.
So the question is: how to correctly compile for wasm32 target?
from printpdf.
breaking change from bb2645e
from printpdf.
i got the same error ...i just add the follow dependencies and it work ...dont ask me how... it just did
[dependencies]
chrono = "0.4"
wasm-bindgen = "0.2.91"
serde-wasm-bindgen = "0.6.3"
serde_bytes = "0.11.9"
from printpdf.
Related Issues (20)
- [Feature suggestion]Vertical text HOT 4
- Clarify function input units using Pt or Mm struct HOT 1
- target wasm32 is using stdweb HOT 3
- How To Use FontData for Calculating Width and Height of a Text HOT 2
- Hyperlinks HOT 5
- `write_text` function cannot use different font than used `use_text`
- Update dependencies
- `set_text_matrix(TextMatrix::Rotate(45.0))` rotate text only in its corner
- documenation is not updated with the changes in v 0.6.0 HOT 1
- Font example(and also normal pdfs) produce error in Adobe reader
- requires JavaScript for wasm builds
- get_font clones external font data everytime
- How can i end a pdf line before it overflows HOT 1
- Use differents layer to put text HOT 2
- Can't print image in pdf HOT 1
- PDF file size is 3.5x bigger than its contents HOT 2
- Error building as wasm32-wasi target HOT 1
- Rotate text HOT 2
- Issue with PNG transparent background being black HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from printpdf.