I am using PNG,JPEG or BMP files.
All 3 images op displayed fine on the ScaleRV.
When I print the document when using a png image, the background is not printed (With BMP of JPG it's fine)
When exporting to Docx, I don't have any backgrounds.
I use the '.SaveDocX' command
This is the complete routine to set the background:
Code: Select all
Procedure Getbackgroundimmage;
var
path, Ext : string;
Pic : TBitmap;
Png : TPNGImage;
JPG : TJpegImage;
begin
path := parameters.curdir + 'Templates\'+ frmTemplatebuilder.txtbtnBGImage.text;
ext := uppercase(ExtractFileExt(path));
if not fileexists(path) then exit;
Pic := TBitmap.Create;
if ext = '.PNG' then
begin
Png := TPngImage.Create;
Png.LoadFromFile(path);
Pic.Assign(png);
end
else if ext = '.JPG' then
begin
JPG := TJPEGImage.Create;
JPG.LoadFromFile(path);
Pic.Assign(JPG);
end
else if ext = '.BMP' then
Pic.LoadFromFile(path)
else
exit;