Can provide a pdf printing example for setting the password?

When I set a password, but the password is wrong, the file cannot be opened.
please help


  • Hi Andy,

    Which version of ReportBuilder and Delphi are you using? ReportBuilder has supported encrypted PDF exports for quite some time.

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • Is ReportBuilder 20.04

    There is no problem in exporting to encrypted PDF.
    But the password entered when opening the PDF is incorrect.

    with ppReport_201709_PDF.PDFSettings do begin
    with ppReport_201709_PDF.PDFSettings.EncryptSettings do begin
    UserPassword := 'test';

    Since there is no example of encrypted PDF in the demo provided, can it be provided as a reference?
  • Hi Andy,

    Thanks for the information. In my tests, encryption is working correctly with code similar to yours and I am able to successfully open a password protected PDF. Below is the code I used to test. If you are still unable to get this working, please create a simple example and send it to and I'll take a look at what is happening.

    procedure TForm2.Button1Click(Sender: TObject);
    ppReport1.DeviceType := dtPDF;
    ppReport1.OpenFile := True;
    ppReport1.AllowPrintToFile := True;
    ppReport1.ShowPrintDialog := False;
    ppReport1.TextFileName := 'Test.pdf';

    ppReport1.PDFSettings.Author := 'Test';
    ppReport1.PDFSettings.Title := 'Test';

    ppReport1.PDFSettings.EncryptSettings.UserPassword := 'Test';
    ppReport1.PDFSettings.EncryptSettings.Enabled := True;


    Best Regards,

    Nico Cizik
    Digital Metaphors
  • The situation remains the same, PDF cannot be opened with the correct password.
    The project file has been sent to
  • Has been tested in the following environment.
    Exported PDF cannot be opened by correct password.

    Delphi 10.4.1 & RB 20.04
    Delphi 10.4 & RB 18.01
    Delphi XE & RB 20.04
  • Windows 10 Pro Chinese-T
  • Hi Andy,

    Thanks for the example and information. This issue appears to only occur when the Windows regional locale is set to a non-latin value. It likely has to do with the changed ANSI code page being used in that case.

    We will research this further and report back here once a solution is found.

    Best Regards,

    Nico Cizik
    Digital Metaphors
  • This issue will be fixed for the next version of ReportBuilder. Registered users can contact support@ for a temporary work-around.

    Note that this issue only affects certain regional locales.

    Best Regards,

    Nico Cizik
    Digital Metaphors
Sign In or Register to comment.