Closed xuakson closed 2 weeks ago
@xuakson You can use version 4. Everything should still work fine
Version 4 of what? please send the link, i'm confused, bcus i see 11.xx
@xuakson https://github.com/Sparticuz/node-qpdf2/releases/tag/v4.1.0
You can still use the latest version of qpdf, you will need to use v4 of node-qpdf2 though if you need cjs.
oh see it, thanks sir, worked , [AsyncFunction: encrypt]
another question, can i get result in buffer?
ayee, this is typescript, dont understand, this is my codes ` ![image](https://github.com/Sparticuz/node-qpdf2/assets/23705128/e70a4031-b0b7-42c7-824a-4a952890971d)
To use this package on commonjs
module you can use this. Here's an example:
import type nodeQpf from 'node-qpdf2'
...
const { encrypt } = await importEsmModule<typeof nodeQpf>( 'node-qpdf2' )
Hope this helps :)
To use this package on
commonjs
module you can use this. Here's an example:import type nodeQpf from 'node-qpdf2' ... const { encrypt } = await importEsmModule<typeof nodeQpf>( 'node-qpdf2' )
Hope this helps :)
didnt work sir, i use version 4 worked, thank for helping anyway, i'm getting issue with await yet it at the top level,
You can only use await
inside an async
function. I'm using latest version without errors:
import type nodeQpf from 'node-qpdf2'
async function myFunction() {
const { encrypt } = await importEsmModule<typeof nodeQpf>( 'node-qpdf2' )
await encrypt({ ... })
}
How do i use this in common js , node js environment, i dont want to set the type to module in the packagae json file neither change file extension to mjs because all my fies in common js only, give me ideas how to use this to blend with the common js , thanks in advance