problem with images printed like filled black square
problem with images printed like filled black square
We have a very strange problem: sometimes images included in richview are printed as black square!
This may happend with casuality and with many different priters and OS's. For example, if i print a mail-merge document of 20 records, may be that 2 or 3 pages have a black square instead of the real image! Does someone have any ideas?
This may happend with casuality and with many different priters and OS's. For example, if i print a mail-merge document of 20 records, may be that 2 or 3 pages have a black square instead of the real image! Does someone have any ideas?
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
seems to be a tipical delphi problem with hp printers
I've found this interesting discussion....
http://groups.google.com/group/borland. ... 8ec5fc63ee
http://groups.google.com/group/borland. ... 8ec5fc63ee
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I just discovered that the black images sometimes also appeared in pdf creation. Unfortunatly I cann't reproduce the problem anymore, because I don't have the exact sources. I do have a pdf document, printed from RVE, with black rectangles in it, but I doubt if that is of any use.
My suggestion is that if anyone gets a black rectangle printed instead of the picture, to print the same document to pdf, in the hope that it will also show the black rectangle. In that way we can provide Sergey with a reproducable example. (I use the freeware PDFCreator)
thanks,
My suggestion is that if anyone gets a black rectangle printed instead of the picture, to print the same document to pdf, in the hope that it will also show the black rectangle. In that way we can provide Sergey with a reproducable example. (I use the freeware PDFCreator)
thanks,
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I'm not sure, but I just discovered an error (which I never realized and thus is in all my programs, I think it's also not correct in the RV examples), which might be the causeof this problem.
I do printing always through a printersetup dialog,
and I forget to reformat after the user selects a different printer.
here is the correct code
I do printing always through a printersetup dialog,
and I forget to reformat after the user selects a different printer.
here is the correct code
Code: Select all
RVPrint1.AssignSource(RVE_mother);
RVPrint1.FormatPages(rvdoALL);
if rvpp.RVPrint.PagesCount=0 then exit;
with printdialog1 do
begin
minpage:=1;
maxpage:=rvpp.RVPrint.PagesCount;
frompage:=minpage;
topage:=maxpage;
old_printer:=printer.printerindex;
if execute then
begin
if old_printer<>printer.PrinterIndex then // <== these lines are essential
RVPrint1.FormatPages(rvdoALL); // <== these lines are essential
if printrange=prAllPages then
tRVPrint(rvpp.RVPrint).Print('PuntHoofd',1,False)
else
RVPrint1.Printpages(frompage,topage,'PuntHoofd',1,false);
end;
end;
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: