converting pdf only works sometimes
Posted: 2008-05-29T15:49:52-07:00
i have two, one page pdf files im testing this on. heres the code im using (in a php script)
exec('convert -density 300x300 plan.pdf -crop 2880x2880 plan.jpg');
if i take out "-density 300x300" it defaults to 72, which makes the jpg a lot smaller than the original pdf(it needs to stay the same size). also if that is removed, everything works fine, i just have a smaller image. however, the way it currently is, it will only work on the smaller pdf (135KB, 7000x5000 px). on the larger pdf (1.28MB, 10800x14400 px) it doest ever finish. i sometimes get a few pieces of the picture but thats about all. if i take out "-crop 2880x2880" i get nothing at all on the larger pdf. any ideas as to why the conversion isnt working?
thanks
exec('convert -density 300x300 plan.pdf -crop 2880x2880 plan.jpg');
if i take out "-density 300x300" it defaults to 72, which makes the jpg a lot smaller than the original pdf(it needs to stay the same size). also if that is removed, everything works fine, i just have a smaller image. however, the way it currently is, it will only work on the smaller pdf (135KB, 7000x5000 px). on the larger pdf (1.28MB, 10800x14400 px) it doest ever finish. i sometimes get a few pieces of the picture but thats about all. if i take out "-crop 2880x2880" i get nothing at all on the larger pdf. any ideas as to why the conversion isnt working?
thanks