BackgroundImage is not printing

General TRichView support forum. Please post your questions here
Post Reply
infrax
Posts: 31
Joined: Wed Aug 10, 2011 10:57 am

BackgroundImage is not printing

Post 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
infrax
Posts: 31
Joined: Wed Aug 10, 2011 10:57 am

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
infrax
Posts: 31
Joined: Wed Aug 10, 2011 10:57 am

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If you use TRVReportHelper for printing, make sure that APreview parameter of DrawPage = False.

(it's better to leave RichViewAlternativePicPrint=False)
infrax
Posts: 31
Joined: Wed Aug 10, 2011 10:57 am

Post by infrax »

Yes, that was it.

Thanks.
Post Reply