Page 1 of 1

Black background with gif and png

Posted: Sat Jun 13, 2015 1:35 pm
by Jim Knopf
If I print to pdf (using TWPPDFPrinter), the background of png and gif images is black. Also if I export one page out of TSRichViewEdit to a wmf file it's the same.
Btw: The regular view in TSRichViewEdit is perfect, printing to printer too. Only not to pfd (and wmf).

I tried out a lot of combinations of transparencymodes an -colors and some more but alwas the same result.

Code: Select all

var
  Pic: TPicture;
  PNam: TRVAnsiString;
  PTag: TRVTag;
  Al: TRVVAlign;
  He, Wi, Wi2, Pi, Pr, PaV, PaH, Co, CoB: Integer;
  Alt: string;
begin
(. . . got from another TRichViewEdit . . .)
  Pic := TPicture.Create;
  try
    Pic.LoadFromFile(PicNam);
    Gr := RV_CreateGraphics(TGraphicClass(pic.Graphic.ClassType));
    Gr.Assign(Pic.Graphic);
    R.AddPictureEx(PicNam, Gr, TargPa[PNr], Al);
    R.SetItemExtraStrProperty(R.ItemCount-1, rvespImageFileName, PicNam);
    R.SetItemExtraIntProperty(R.ItemCount-1, rvepImageWidth, Wi);
    R.SetItemExtraIntProperty(R.ItemCount-1, rvepImageHeight, He);
    R.SetItemExtraIntProperty(R.ItemCount-1, rvepSpacing, Pi);
    R.SetItemExtraIntProperty(R.ItemCount-1, rvepBorderWidth, Pr);
    R.SetItemExtraIntProperty(R.ItemCount-1, rvepOuterVSpacing, PaV);
    R.SetItemExtraIntProperty(R.ItemCount-1, rvepOuterHSpacing, PaH);
    R.SetItemExtraIntProperty(R.ItemCount-1, rvepColor, Co);
//    R.SetItemExtraIntProperty(R.ItemCount-1, rvepColor, clWhite);   < no effect
    R.SetItemExtraIntProperty(R.ItemCount-1, rvepBorderColor, CoB);
//    R.SetItemExtraIntProperty(R.ItemCount-1, rvepTransparent, 1);   < no effect
//    R.SetItemExtraIntProperty(R.ItemCount-1, rvepTransparentColor , clWhite);   < no effect
  finally
    Pic.Free;
  end;
. . .
end;
// = some of the trials

Do you have a hint?

Posted: Sun Jun 14, 2015 1:32 pm
by Sergey Tkachenko
ScaleRichView does not support picture transparency when printing. We are currently working on this problem.

Posted: Sun Jun 14, 2015 2:55 pm
by Jim Knopf
Okay, so I'm looking forward your solution - thank you