Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PDFDoc := TgtPDFDocument.Create(nil);
- try
- oWatermark := TgtImageWatermarkTemplate.Create;
- try
- PDFDoc.LoadFromFile(sTmpPDF);
- with PDFDoc do
- begin
- if IsLoaded then
- begin
- with oWatermark do
- begin
- ImageFormat := ofBMP;
- Name := 'CIDAP';
- Image := Vcl.Graphics.TBitmap.Create;
- //Image.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Watermark.bmp');
- Overlay := False;
- OpacityFill := 75;
- HorizPos := hpCenter;
- VertPos := vpMiddle;
- end;
- InsertWatermark(oWatermark);
- SaveToFile(sTmpWMFile);
- Reset;
- end;
- end;
- finally
- oWatermark.Free;
- end;
- finally
- PDFDoc.Free;
- end;
- DeleteFile(sTmpPDF);
- sTmpPDF := sTmpWMFile;
- end;
- bDeleteFile := True;
- if AssinarLaudo(sCertList) then
- sTmpPDF := SignPDFDoc(sTmpPDF, sCertList);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement