Even cooler would be to be able to use the security plugin architecture so that one could write a custom plugin to enable all sorts of access rights/ encryption....
Just a wish to be added to the wish list.

Dany wrote:Securing the document while priting is something provided by version 2.1 of the PDF Converter which will also support 128 bits encryption. Check out for the new version somewhere in November...
For the security plugins, we will keep this on our wish-list.
Code: Select all
(Excel VBA)
Sub MyPDFMacro()
pdf = DriverInit("Amyuni PDF Converter")
If pdf = 0 Then
MsgBox "Cannot initialize PDF printer"
Exit Sub
End If
SetResolution pdf, 1200
SetDefaultConfig pdf
SetDefaultPrinter pdf ' set this printer as default
SetDefaultFileName pdf, "c:\ztest" & Format(Now(), "yyyymmddhhmss") & ".pdf"
SetFileNameOptions pdf, NoPrompt + UseFileName + ProtectPDF
EncryptPDFDocument pdf, "user", "pwd", -64
ActiveWorkbook.PrintOut
DriverEnd pdf
End Sub
Joan answered:As code in my previous post, things works fine, file is created on disk, BUT, I get suddenly a dialogbox with errormessage "Encryption failed" (no more nor less). It appears just after all pages has been has been processed/created (ActiveWorkbook.PrintOut process all pages fine it seem). File is on disk, uncrypted (ouch).
So... What can cause this?
AND, IMHO, if you want a file crypted and it was unable to do so, last thing you want is to see it saved uncrypted, better not saved at all.
Concerning the second issue, please send a request to support@amyuni.com they will open a case and try to reproduce this. Please send them the code you are using along with detailed test case to reproduce this issue.
stuff, well I don't see how you do this with the DLL API...Create/Print your document as "A4" format
Here the "Encryption Failed" Error dialogbox pops up
Now change Printerdriver to be the same as your desired format