1
votes

I have a problem to set watermark image format in the TgtImageWatermarkTemplate component (which is part of the Gnostice PDFtoolkit VCL library). I have the following code:

var
  Watermark: TgtImageWatermarkTemplate;
begin
  ...
  // create and set watermark properties
  Watermark := TgtImageWatermarkTemplate.Create;
  Watermark.ImageFormat := ofJPEG; // <- this line fails the compilation
  ...
end;

But it fails to compile with the following error:

[DCC Error] Unit1.pas(186): E2003 Undeclared identifier: 'ofJPEG'
[DCC Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas'
Failed Elapsed time: 00:00:01.5

In which unit is the ofJPEG identifier declared (I think it's member of the TgtOutFormat enumeration)? Which unit should I add to my uses clause?

1
Do you have the source for the library? If so, grep for ofJPEG in it.Uli Gerhardt
i have not source of library.i get this component from Gnostice's website: gnostice.com/PDFtoolkit_VCL.aspkiasoft
The enum value should be changed to ifJPEG.gn1

1 Answers

0
votes

Please include gtCstPDFDoc unit in your PAS file. The enumeration TgtImageFormat is from that.

UPDATE: The enumeration values start with if and so it is ifJPEG.