Printing images in Flex
-
23-09-2019 - |
Question
In s Flex 3 app, I have canvas with a PNG image for a background. The image is the same width & height as the canvas. I also have some other controls in the canvas:
<mx:Canvas id="form" backgroundImage="@Embed(source='images/formBkg.png')" width="640" height="480" >
<mx:label .../>
<mx:label .../>
I print the canvas using the following code:
var printJob:FlexPrintJob = new FlexPrintJob();
if (printJob.start())
{
printJob.addObject(form, FlexPrintJobScaleType.SHOW_ALL);
printJob.send();
}
On screen it looks great, but when I print it the quality of the png degrades. It is not terrible, but not as sharp as what is shown on screen.
Is there anything I can do to improve the quality of the printed png?
Solution
Flex doesn't do a great job at printing (caveman approach of creating a big image and shove it in the printer). you should consider external libraries such as AlivePDF
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow