#1 2014-02-10 21:58:16

boriademidovitch
Member
Registered: 2014-02-10
Posts: 1

Transparent image in PDF

Hello,

I have encountered a problem while converting a meta-file with a transparent image into pdf.
Meta-file is correct-looking while in pdf the background of my image is filled with white color.
If possible, could you help me with solving this problem?

My code:

var
  m : TMetaFile;
  p : TPdfDocumentGDI;
begin
  p := TPdfConverter.Create;
  with p do begin
    DefaultPaperSize := psA5;
    EmbeddedWholeTTF := True;
    CompressionMethod := cmFlateDecode;
    ForceJPEGCompression := 100;
    StandardFontsReplace:= False;
    UseUniscribe := True;
  end;
  m.LoadFromFile(EmfFileName);
  p.AddPage;
  p.VCLCanvas.Draw(0, 0, m);
  p.SaveToFile(PdfFileName);
end;

WinXP SP 3
Delphi 7
SynPDF Version 1.8 (2014-01-01)
{$define USE_SYNGDIPLUS}

Files:
emf: http://yadi.sk/d/OQEdNOaOHfTEZ
pdf: http://yadi.sk/d/5Ng35i_EHfWrW

Thank You

Offline

#2 2014-02-10 23:44:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: Transparent image in PDF

Duplicate question IMHO...
See http://synopse.info/forum/viewtopic.php?pid=7965#p7965

What you can do is drawing the image first, then print the text over it.

Offline

Board footer

Powered by FluxBB