Focal Point
[REOPENED]PDF Password

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1837071286

May 04, 2016, 07:59 AM
Jay Potter
[REOPENED]PDF Password
Has anyone figured out how to assign passwords to a PDF without doing it via a zip process?

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
May 04, 2016, 08:26 AM
Ramkumar - Webfous
I dont think it is possible.

One weird option in case if yours is a simple PDF report and will be viewed online - Have to check with scheduling...

Use ARPASSWORD and make your report AHTML and ask the user to export it to PDF.


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5
May 04, 2016, 08:27 AM
Waz
I don't believe that WebFOCUS supports this.

I would suggest using a third party tool to pw protect the document.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

May 04, 2016, 04:14 PM
Jay Potter
Thank you for both replies. I did not think that it was possible after reading other posts. I was hoping somebody had found a work around.

Unfortunately the user would not be viewing the report online before saving. I will see about using the zip process.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
May 17, 2016, 01:50 PM
Jay Potter
I have been looking into using a C# DLL. We presently within a C# program can password protect a pdf. Has anyone ever called a C# DLL from a fex?


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
May 17, 2016, 03:07 PM
Squatch
quote:
Originally posted by Jay Potter:
...Has anyone ever called a C# DLL from a fex?

The RStat product offered by IBI calls a C language DLL from within a fex. It is done in a COMPUTE statement:

COMPUTE SCORE/A3 = audit_score(AGE, EMPLOYMENT, EDUCATION, MARITAL, OCCUPATION, INCOME, GENDER, DEDUCTIONS, HOURS, 'A3');

In this case, there are parameters being passed to the DLL, and it returns an "A3" type result.

This happens for every line in a report. That's not what you want, but it shows that fex files can call DLLs. And the DLL and fex file in this example exist on the Reporting server.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
May 17, 2016, 03:20 PM
Jay Potter
What folder did you place your dll? Do you have to register it?


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
May 17, 2016, 03:33 PM
Squatch
quote:
Originally posted by Jay Potter:
What folder did you place your dll? Do you have to register it?

RStat is still new to me, but I think the DLL and fex file can go in either a Content folder or on the Reporting server.

The DLL is not registered with Windows that I am aware of; I think it just needs to be in the same folder as the fex file. Or maybe a path can be specified in the fex, I'm not sure at this point.

You could try creating a C# DLL that returns a number or alpha string, then try to call it using something similar to the COMPUTE example I gave earlier. Then you would at least know that you can call a DLL from a fex without having RStat. That might get you closer to what you want to do.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
May 17, 2016, 05:52 PM
Waz
I would have though that a java program may be the easiest to pw protect a PDF, and there are many out there, and easily called with an OS command


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

May 18, 2016, 07:42 AM
Jay Potter
Thank you for all of these suggestions. I will be looking into creating the DLL and trying it out.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster