How do i create password protected pdf file in vb6.0? -
I am working with VB6.0 and I need to create a password protected PDF file in vb6.0.
I have successfully created a PDF file but how can I protect it?
Edit: I'm exporting the code from the word file using my PDF file.
objWordDoc.ExportAsFixedFormat Output filename: = _ sDests & amp; SDestsPDFFile, ExportFormat: = wdExportFormatPDF, _OpenAfterExport: = False, OptimizeFor: = wdExportOptimizeForPrint, Category: = _, wdExportAllDocument, From: = 1, To: = 1, Item: = wdExportDocumentContent, _DocProps Include: = Truth, KeepIRM: = Truth , CreateBookmarks: = _ wdExportCreateNoBookmarks, DocStructureTags: = True, BitmapMissingFonts: = _ True, UseISO19005_1: = False
ExportXFix format
password has no mechanism for protecting PDFs. You need to use some other tools.
Edit
To address your follow-up question, there are several tools that can add password protection. Current documents My company, Atlasoft, it It will do the same (though it is a very big hammer for a very small nail). The code of the password protects the existing PDF, looks like this:
Public Fixed Zero SetPdfPassword (Stream InStream, Stream Outstream, String UserPerson, String Owner Password) {PDF Document Document = New PDF Document (Instream); Doc.Save (userpassword, ownerpassword, outstm); }
Our tools, however, are not integrated into the word.
Comments
Post a Comment