Hi,
I have multiple base 64 image strings in a txt file. I can combine the strings into one base64 string and convert them to a pdf but it does not write each base64 image to a different pdf page, it just writes them to one really long page. Also if I try multiple base64 strings, the conversion does not work. Here's my command that works:
/usr/bin/convert inline:blob.txt -quality 100 -density 120 complete.pdf
If the "blob.txt" file contains :
data:image/png;base64,stringheredata:image/png;base64,stringhere
it does not work
Basically my goal here is to get each base64 string (image) on a different page of the pdf
Any help would be appreciated, thanks
Convert multiple base64 images to multi page pdf
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert multiple base64 images to multi page pdf
What happens if you have one text file per base 64 image?
snibgo's IM pages: im.snibgo.com
Re: Convert multiple base64 images to multi page pdf
Thanks for this, that almost worked but it just put the text straight in the pdf, I then added inline: and it put the images properly in the pdf on separate pages, the final command was:
/usr/bin/convert inline:blob0.txt inline:blob1.txt -quality 100 -density 120 complete.pdf
/usr/bin/convert inline:blob0.txt inline:blob1.txt -quality 100 -density 120 complete.pdf