Error access violation when create pdf file with password

Hi.
I get the error when create pdf file with password.
PDF file successfully created, but it cannot be opened.



below is my code :
     PathApp := 'D:\E-Report\';
     NameFile := 'MonthlyReport';
     frxreport.LoadFromFile('Server01\' + 'report01.fr3');

    frxPDFExport1.ShowDialog := False;
    frxPDFExport1.Background := False;
    frxPDFExport1.UserPassword :='test';
    frxPDFExport1.OwnerPassword :='test';
    frxPDFExport1.ProtectionFlags := [ePrint];

    frxPDFExport1.FileName := PathApp+NameFile+'.pdf';

    frxreport.PrepareReport(true);

    frxreport.Export(frxPDFExport1);

Is there any way to fix it?
Thank you.

Comments

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.