#1 PDF Engine » ChatGPT gives non compiling results ,what is wrong? » Yesterday 06:16:55

etwoss
Replies: 1

var
  Pdf: TPdfDocumentGDI;
begin
  Pdf := TPdfDocumentGDI.Create;
  try
    Pdf.UserPassword := 'view123';   // Password to open PDF
    Pdf.OwnerPassword := 'edit456';  // Password to override restrictions
    Pdf.EncryptPDF := True;
    Pdf.EncryptionPermissions := [ppPrint, ppCopy]; // Permissions

    Pdf.AddPage;
    Pdf.VCLCanvas.TextOut(100, 100, 'Encrypted content');

    Pdf.SaveToFile('encrypted.pdf');
  finally
    Pdf.Free;
  end;

This part does not compile, why??

   Pdf.UserPassword := 'view123';   // Password to open PDF
    Pdf.OwnerPassword := 'edit456';  // Password to override restrictions
    Pdf.EncryptPDF := True;
    Pdf.EncryptionPermissions := [ppPrint, ppCopy]; // Permissions


Eric

#2 Re: PDF Engine » PDF as Background Image » 2025-07-09 13:48:03

Hi

Is there no complete example on how to add a watermark? I'm new to SyncPDF

Thanks,

Eric

Board footer

Powered by FluxBB