2012-02-27 2 views
4

PDF에 비밀번호를 넣을 수있는 도구 나 DLL이 있습니까?일괄로 PDF에 비밀번호를 입력하는 방법

예 1,000 개의 PDF 파일이 있습니다. 각 PDF에 비밀번호를 지정하고 싶습니다. 암호는 각 파일마다 다를 수 있습니다.

-Regards, 당신이 할 수있는 .NET Gnostice PDFOne를 사용 RYL

+0

PDF 실험실에서 PDFTK를 사용했습니다. – user870510

답변

0

Docotic.Pdf library은 암호로 PDF 파일을 보호하는 데 사용할 수 있습니다. 모든 보호 된 PDF 파일에 대한

Dim filesToProcess As String() 
' populate filesToProcess somehow 

For Each fileName As String In filesToProcess 
    Using pdf As New PdfDocument(fileName) 
     ' use OwnerPassword property if you need to protect file from being modified 
     ' use UserPassword property if you need to protect file from being modified and from being viewed without knowing the password 
     pdf.UserPassword = "password" 

     ' there is also another supported encryption algorithms 
     pdf.Encryption = PdfEncryptionAlgorithm.Aes128Bit 

     Dim savePath As String = fileName & "encrypted.pdf" 
     pdf.Save(savePath) 
    End Using 
Next 

할 수도 setup permissions : 여기

은 당신의 작업에 대한 샘플 코드입니다.

면책 조항 : 본인은 해당 라이브러리의 공급 업체를 찾고 있습니다.

관련 문제