Page 1 of 1

BackgroundImage is not printing

Posted: Mon May 21, 2012 8:57 am
by infrax
I'm trying to print a document with a background image in it (or document with one big table (to fit A4) with background image).
I'm using ReportHelper to print&draw RV to printer canvas.
Position of this image is set to stretched.
If I print it to local (file) printer (bullzip, xps document printer, ..) everything is OK, but if I print it on an actual printer (tried with 3 different printers) there is no background image.

If I try with your demo application, it is OK on the actual printer as well.

If I set the image position to none then it prints OK, but I need it stretched.

What am I missing?

Another question. I noticed that if I set background image to the whole document the size of the file is very big (doesn't matter JPG, PNG, ...) -> is this stored as BMP? With tables it is OK ->one table to fit A4 and then set background image to it -> small file size (i used PNG).

Thanks

Posted: Wed May 30, 2012 8:49 am
by infrax
An update to this.

So we have a table with a background image (as stretch-eh). I'm printing on a physical printer. If the image is BMP it prints OK, if JPG or PNG it's not OK.

Printing on a local PDF printer -> it's always OK.

Any ideas?

Posted: Wed May 30, 2012 10:03 am
by Sergey Tkachenko
Any picture (except for metafiles) are printed by TRichView identically (by converting it to a bitmap and printing this bitmap).

What's the value of RichViewAlternativePicPrint global variable (defined in RVFuncs.pas)? Try to change it and retest.

Posted: Wed May 30, 2012 11:01 am
by infrax
RichViewAlternativePicPrint was False, but also with True it's the same.

Is there any difference between TRVPrint and TRVReportHelper? If the same document is printed with demo ActionTestRibbon (uses TRVPrint) it is OK.

Posted: Wed May 30, 2012 11:39 am
by Sergey Tkachenko
If you use TRVReportHelper for printing, make sure that APreview parameter of DrawPage = False.

(it's better to leave RichViewAlternativePicPrint=False)

Posted: Wed May 30, 2012 12:18 pm
by infrax
Yes, that was it.

Thanks.