Coverting PDFs: White background instead of transparency
Posted: 2012-11-15T04:35:15-07:00
When converting vector PDF pages to image formats that are aware of transparency, I often have the problem that the background becomes black, i.e. I would have to read black text on black background. Obviously, the canvas (i.e. the page) is considered to be fully transparent. (When converting to JPEG, the background is always white.) How could I achieve a white background instead?
Right now, I am trying to detoriate the quality of a vector PDF by rasterising it and rotating the pages by an arbitray angle:
With this command line, the problem of dark background also affects the conversion to JPEG format.
If I convert directly to raster PDF
the conversion works. This direct conversion will however not work for PDFs with a larger page count, as it needs too much memory.
Right now, I am trying to detoriate the quality of a vector PDF by rasterising it and rotating the pages by an arbitray angle:
Code: Select all
convert test.pdf -distort SRT "%%[fx:int(rand()*10)-5]" -scene 1 test-%%02d.jpg
If I convert directly to raster PDF
Code: Select all
convert -density 200 test.pdf -distort SRT "%%[fx:int(rand()*2)-1]" -compress zip test_det.pdf