-
Notifications
You must be signed in to change notification settings - Fork 147
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
Empty string output #84
Comments
I also have the same issue. Here's my code let res = await fetch(url);
let buffer = await res.buffer();
const options = {
width: 2550,
height: 3300,
density: 330,
savePath: "./output/from-buffer-to-base64"
}
// let convert = fromPath('pdf.pdf', options);
let convert = fromBuffer(buffer, options);
console.log(convert)
let output = await convert(1, true)
console.log('output')
console.log(output)
let base64 = output.base64;
console.log('base64')
console.log(base64)
See the console outputs:
Edit: Does not work with the specimen1.pdf or other pdf's I tried |
Ok this is dumb but I actually didn't install the dependencies Unfortunately I won't be able to use the library since I'll use it in a Google Cloud Function. If you are looking for an alternative like me you can use external API's such as cloudconver |
|
I think I was referring to the Ubuntu packages: https://github.com/yakovmeister/pdf2image/blob/master/docs/gm-installation.md Follow the Windows instructions there |
yes, I installed both under C:\Program Files, but it still doesn't work, base64 is an empty string :(( Do you know a different package with a similar function? |
is there any update regarding the issue? guys, it's working fine before now it's broken. |
Hi I use your library regularly, thank you for making it.
I recently had an issue where the
resizedImageBase64
above was an empty string. I was actually unable to replicate the issue on either my windows machine or within WSL.... I have it running in docker with the imagemagick and ghostscript packages installed and this is where the error is occurring.However some research showed that ghostscript might silently fail if a font is not included in the PDF and the PDF i had the issue did not have the font included that the text used. I was hoping it might be possible to pass options through to ghostscript through this library in order to test this hypothesis. Is this possible?
Thanks
The text was updated successfully, but these errors were encountered: