Job : I have a PDF file with writing in Hindi. I need output to be a 1 bit (bilevel) BMP file, preferably at a given size.
So far I have the following:
Code: Select all
C:\IM>convert -verbose -type bilevel -depth 1 -density 200 d:\hindi1.pdf d:\hindi2.bmp
[ghostscript library] -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r200x200" "-sOutputFile=C:/../Temp/magick-AifKlr0d-%08d" "-fC:/../Temp/magick-y666brcZ" "-fC:/../Temp/magick-emE4zcNr"
/Temp/magick-AifKlr0d-00000001 PNG 1497x2206 1497x2206+0+0 8-bit DirectClass 241KB 0.156u 0:00.203
/Temp/magick-AifKlr0d-00000002 PNG 1497x2206 1497x2206+0+0 8-bit DirectClass 159KB 0.141u 0:00.1
39
/Temp/magick-AifKlr0d-00000003 PNG 1497x2206 1497x2206+0+0 8-bit DirectClass 200KB 0.141u 0:00.1
40
/Temp/magick-AifKlr0d-00000004 PNG 1497x2206 1497x2206+0+0 8-bit DirectClass 69.4KB 0.141u 0:00.
140
d:\hindi1.pdf[0] PDF 1497x2206 1497x2206+0+0 1-bit DirectClass 241KB 0.438u 0:00.452
d:\hindi1.pdf[1] PDF 1497x2206 1497x2206+0+0 1-bit DirectClass 241KB 0.297u 0:00.312
d:\hindi1.pdf[2] PDF 1497x2206 1497x2206+0+0 1-bit DirectClass 241KB 0.156u 0:00.156
d:\hindi1.pdf[3] PDF 1497x2206 1497x2206+0+0 1-bit DirectClass 241KB 0.000u 0:00.000
d:\hindi1.pdf=>d:\hindi2-0.bmp[0] PDF 1497x2206 1497x2206+0+0 1-bit Bilevel PseudoClass2c 410KB 3.875u 0:03.281
d:\hindi1.pdf=>d:\hindi2-1.bmp[1] PDF 1497x2206 1497x2206+0+0 1-bit Bilevel DirectClass 9.896MB 4.000u 0:03.500
d:\hindi1.pdf=>d:\hindi2-2.bmp[2] PDF 1497x2206 1497x2206+0+0 1-bit Bilevel DirectClass 9.896MB 4.047u 0:03.656
d:\hindi1.pdf=>d:\hindi2-3.bmp[3] PDF 1497x2206 1497x2206+0+0 1-bit Bilevel DirectClass 9.896MB 4.094u 0:03.812
- The first page of the PDF is converted correctly (not exactly to size, but for now OK). But any other pages are coming out 24 bits
Have a look at the PseudoClass2c in first file vs. DirectClass in other 3.
This is my most serious problem. - I do not know how to set exact size (specifying width = 4800 instead of density)
The original source of the document is MS Word, so I can also go other routes. Open for suggestions, the faster the better.
I can provide example source files if needed.