Export to PDF with password (fastreport & vb6)
I use vb6 and fastreport 4.0.1..
My application need to export fastreport to pdf file.
I have no problem to export the fastreport to pdf.
But i don't know how to set password for exported pdf.
My export source code :
Dim WithEvents frx As FastReport.TfrxReport
Dim frxExport As IfrxBuiltinExports
Set frx = CreateObject("FastReport.TfrxReport")
Set frxExport = frx
frx.PrepareReport (True)
frxExport.ExportToPDF ("\test.pdf", True, True, True)
Anyone have idea?
My application need to export fastreport to pdf file.
I have no problem to export the fastreport to pdf.
But i don't know how to set password for exported pdf.
My export source code :
Dim WithEvents frx As FastReport.TfrxReport
Dim frxExport As IfrxBuiltinExports
Set frx = CreateObject("FastReport.TfrxReport")
Set frxExport = frx
frx.PrepareReport (True)
frxExport.ExportToPDF ("\test.pdf", True, True, True)
Anyone have idea?
Comments
If you want to declare frxExport, declare it as
dim frxExport as TfrxDispatchableExports
I try your code, but i got this error.. "Object doesn't support this property or method"
My TfrxReport, doesn't have the ".Exports" only have this member "ExportReport"
Sorry, i'm not really understand using vb with fastreport.
All you can do is replace it with latest version of fast-report.
Or check if you can find TfrxDispatchableExports object and use second solution i have provided in last post.