@@ -75,7 +75,7 @@ pub struct PrintPdfApiReturn<T: serde::Serialize> {
75
75
/// Data or error of the output of the function.
76
76
#[ derive( Serialize , Deserialize , Debug , PartialEq , Clone ) ]
77
77
#[ serde( untagged) ]
78
- enum StatusOrData < T : serde:: Serialize > {
78
+ pub enum StatusOrData < T : serde:: Serialize > {
79
79
Ok ( T ) ,
80
80
Error ( String ) ,
81
81
}
@@ -99,7 +99,7 @@ enum StatusOrData<T: serde::Serialize> {
99
99
/// // }
100
100
/// ```
101
101
#[ allow( non_snake_case) ]
102
- #[ cfg_attr( feature = "wasm" , wasm_bindgen:: prelude:: wasm_bindgen) ]
102
+ #[ cfg_attr( target_family = "wasm" , wasm_bindgen:: prelude:: wasm_bindgen) ]
103
103
pub fn Pdf_HtmlToPdfDocument ( input : String ) -> String {
104
104
let input = match serde_json:: from_str :: < PrintPdfHtmlInput > ( & input) {
105
105
Ok ( o) => o,
@@ -197,9 +197,8 @@ pub struct PrintPdfParseOutput {
197
197
/// // }
198
198
/// // }
199
199
/// ```
200
- #[ cfg( feature = "wasm" ) ]
201
200
#[ allow( non_snake_case) ]
202
- #[ wasm_bindgen:: prelude:: wasm_bindgen]
201
+ #[ cfg_attr ( target_family = "wasm" , wasm_bindgen:: prelude:: wasm_bindgen) ]
203
202
pub fn Pdf_BytesToPdfDocument ( input : String ) -> String {
204
203
let input = match serde_json:: from_str :: < PrintPdfParseInput > ( & input) {
205
204
Ok ( o) => o,
@@ -269,9 +268,8 @@ pub struct PrintPdfPageGetResourcesOutput {
269
268
/// Helper function that takes a PDF page and outputs a list of all
270
269
/// images IDs / fonts IDs that have to be gathered from the documents
271
270
/// resources in order to render this page.
272
- #[ cfg( feature = "wasm" ) ]
273
271
#[ allow( non_snake_case) ]
274
- #[ wasm_bindgen:: prelude:: wasm_bindgen]
272
+ #[ cfg_attr ( target_family = "wasm" , wasm_bindgen:: prelude:: wasm_bindgen) ]
275
273
pub fn Pdf_GetResourcesForPage ( input : String ) -> String {
276
274
let input = match serde_json:: from_str :: < PrintPdfPageGetResourcesInput > ( & input) {
277
275
Ok ( o) => o,
@@ -316,9 +314,8 @@ pub struct PrintPdfPageToSvgOutput {
316
314
}
317
315
318
316
/// Takes a `PdfPage` JS object and outputs the SVG string for that page
319
- #[ cfg( feature = "wasm" ) ]
320
317
#[ allow( non_snake_case) ]
321
- #[ wasm_bindgen:: prelude:: wasm_bindgen]
318
+ #[ cfg_attr ( target_family = "wasm" , wasm_bindgen:: prelude:: wasm_bindgen) ]
322
319
pub fn Pdf_PdfPageToSvg ( input : String ) -> String {
323
320
let input = match serde_json:: from_str :: < PrintPdfPageToSvgInput > ( & input) {
324
321
Ok ( o) => o,
@@ -356,9 +353,8 @@ pub struct PrintPdfToBytesOutput {
356
353
}
357
354
358
355
/// Takes a `PdfDocument` JS object and returns the base64 PDF bytes
359
- #[ cfg( feature = "wasm" ) ]
360
356
#[ allow( non_snake_case) ]
361
- #[ wasm_bindgen:: prelude:: wasm_bindgen]
357
+ #[ cfg_attr ( target_family = "wasm" , wasm_bindgen:: prelude:: wasm_bindgen) ]
362
358
pub fn Pdf_PdfDocumentToBytes ( input : String ) -> String {
363
359
let input = match serde_json:: from_str :: < PrintPdfToBytesInput > ( & input) {
364
360
Ok ( o) => o,
0 commit comments