black and white 300 dpi pdf output in dompdf

1k Views Asked by At

I'm using dompdf for generating pdf with php.

The generated output is 300 DPI, 24 bit color.

I need output as 300 DPI, Black and White color.

Is it possible to achieve in dompdf?

I'm in trouble. If anybody have solved this issue before please help me.

1

There are 1 best solutions below

0
On

AFAIK a pdf as such cannot be set to be black and white. There are two possible options:

  1. Create a stylesheet which renders your page in black and white. This stylesheet could also be used to provide users with a print view of the page.
  2. Use ImageMagick to convert your pdf to black and white after creation. See this question for reference.