Page 1 of 1
Mogrify from multi-pdf to png to multi-tiff
Posted: 2013-04-24T07:51:39-07:00
by benito2313
Hello,
I'm trying to get a multi-pdf to a png and then to a multi-tiff.
But because png cant handle multi pages it puts out "_0" and "_1" after the file name.
My question is how can i put these png files back in a multi tiff (I have multiple pdf with single pages and multiple pages)
i know i can do this directley if i take out the png, but for some reason tesseract doesnt support the file if i do this.
my code now is:
mogrify -denisty 300 -format png +matte *.pdf
mogrify -denisty 300 -format tiff -colorspace Transparent -auto-level -auto-orient +matte *.png
Regards,
Benito2313
Re: Mogrify from multi-pdf to png to multi-tiff
Posted: 2013-04-24T10:40:54-07:00
by fmw42
Does this not work?
mogrify -density 300 -format tiff +matte *.pdf
This works fine for me in IM 6.8.4.10 Mac OSX Snow Leopard as a simple test
convert rose: rose: rose: rose.pdf
mogrify -format tiff rose.pdf
Re: Mogrify from multi-pdf to png to multi-tiff
Posted: 2013-04-24T12:17:34-07:00
by benito2313
Thats just it it only works wen its an png first and then tiff, but i need it to be à multitiff
Re: Mogrify from multi-pdf to png to multi-tiff
Posted: 2013-04-24T13:14:47-07:00
by fmw42
benito2313 wrote:Thats just it it only works wen its an png first and then tiff, but i need it to be à multitiff
You misread my post. I started with a multipage
pdf and converted using mogrify to a multipage tiff.
The multipage pdf was created from combining 3 rose: images into one multipage pdf, since I did not have any other multipage pdfs around. There is no png involved.
By mult-tiff, do you mean multi-page tiff or a pyramid-tiff?
You also never mention your IM version or platform. Please see
viewtopic.php?f=1&t=9620
Re: Mogrify from multi-pdf to png to multi-tiff
Posted: 2013-04-24T18:27:50-07:00
by snibgo
If I wanted to convert a multi-page PDF to a multi-page TIFF via individual PNG files, this is how I would do it:
Code: Select all
convert x.pdf x-%06d.png
convert x-*.png x.tiff
To convert many PDF files, I would put this an a script loop. Perhaps mogrify could do it without a script loop.
However, I'm curious about the tesseract problem. Can you supply a multi-page TIFF that tesseract can use, and one that it can't?
Re: Mogrify from multi-pdf to png to multi-tiff
Posted: 2013-04-24T19:15:13-07:00
by fmw42
There should be no reason to convert to intermediate png, just to then convert to tiff. Mogrify should handle the multipage pdf to multipage tiff just fine as I demonstrated.
Re: Mogrify from multi-pdf to png to multi-tiff
Posted: 2013-04-25T00:20:37-07:00
by benito2313
My problem is solved by using mogrify to .mng file.
Thanx for your help and input
regards,
Benito2313