PDF to PNG Conversion dropped black text
Posted: 2010-06-17T09:19:37-07:00
Hi,
I'm new to imagemagick and trying to support an old program that converted PDFs to PNGs. It was successful in a prior version of ImageMagick (6.2.5 I believe), but the PC that it ran on crashed and now has a corrupted C drive. So I ran a copy of the VB6 program on another pc with the most recent version of ImageMagick (6.6.2.4) and ghostscript (8.71). It created the PNGs, but there is black text missing. Would anyone know why? I've looked for a similar problem and aside of finding information about vector formats and how ImageMagic doesn't handle them well (but keep in mind the old version worked fine). Below is some of the VB6 code ...
filein = "F:\" & filenamin & "[" & ctpage & "]"
fileout = "F:\" & filenamout
msgs = img.Convert("-density", "300x300", filein, "-resize", "33%", "-unsharp", "0x.1+1.0+0.10", fileout)
I'm having trouble with many pages of the PDF, but the first page I have trouble with is one that has a lot of black text and black bar down the right side, with some text embedded in it and a page number at the bottom. In this scenario the only item that showed up on the page is the black bar down the right side of the page. There was no paragraph text, no page number and no wording in the Bar.
On a different page that has black, red and blue text (of the same size), all the black text is missing. The red and blue text is present. I thought about playing around with threshold or another option having to do with color, but I am not sure if that is the way to go.
Thank you for any help you could provide.
Dawn
I'm new to imagemagick and trying to support an old program that converted PDFs to PNGs. It was successful in a prior version of ImageMagick (6.2.5 I believe), but the PC that it ran on crashed and now has a corrupted C drive. So I ran a copy of the VB6 program on another pc with the most recent version of ImageMagick (6.6.2.4) and ghostscript (8.71). It created the PNGs, but there is black text missing. Would anyone know why? I've looked for a similar problem and aside of finding information about vector formats and how ImageMagic doesn't handle them well (but keep in mind the old version worked fine). Below is some of the VB6 code ...
filein = "F:\" & filenamin & "[" & ctpage & "]"
fileout = "F:\" & filenamout
msgs = img.Convert("-density", "300x300", filein, "-resize", "33%", "-unsharp", "0x.1+1.0+0.10", fileout)
I'm having trouble with many pages of the PDF, but the first page I have trouble with is one that has a lot of black text and black bar down the right side, with some text embedded in it and a page number at the bottom. In this scenario the only item that showed up on the page is the black bar down the right side of the page. There was no paragraph text, no page number and no wording in the Bar.
On a different page that has black, red and blue text (of the same size), all the black text is missing. The red and blue text is present. I thought about playing around with threshold or another option having to do with color, but I am not sure if that is the way to go.
Thank you for any help you could provide.
Dawn