packages.flutter icon indicating copy to clipboard operation
packages.flutter copied to clipboard

Add print quality to renderer

Open deakjahn opened this issue 3 years ago • 3 comments

An extra argument to ˙render()˙.

deakjahn avatar May 21 '22 13:05 deakjahn

@deakjahn hello

can you provide an example / description of what it can be used for?

SergeShkurko avatar Jul 19 '22 00:07 SergeShkurko

Yes. To render a PDF for printing. It depends on the native PdfRenderer and the Pdfium code behind it, but the bitmap it creates is supposedly slightly different from the bitmap created for display. I never checked the source code, frankly, but I think the difference is in how it handles aliasing of the edges. Printing has different requirements than displaying.

deakjahn avatar Jul 19 '22 12:07 deakjahn

I checked in the meantime. FOR_DISPLAY uses LCD display specific aliasing techniques. This is clearly unwanted when rendering for print.

deakjahn avatar Jul 28 '22 12:07 deakjahn

@deakjahn thanks for your contribution!

SergeShkurko avatar Sep 29 '22 02:09 SergeShkurko