Solved

ABCpdf7 Psssword Protect Files?

Posted on 2010-09-03
1
483 Views
Last Modified: 2013-11-10
Hello,
I'm using ABCpdf7 to render an html page to pdf. The process saves the rendered pdf file to the server. I need to know if there is an ABCpdf7 method I can use that will password protect these pdf files programmatically. The web site is a bit old - using asp (vbscript). Below is the code used to render and save the html page to pdf.

Set theDoc = Server.CreateObject("ABCpdf7.Doc")
theDoc.HtmlOptions.Timeout = 4000
theURL = "my url webpage to render"
theID = theDoc.AddImageUrl(theURL,True,,True)
Do
                     If Not theDoc.Chainable(theID) Then Exit Do
      theDoc.Page = theDoc.AddPage()
      theID = theDoc.AddImageToChain(theID)
Loop
For i = 1 To theDoc.PageCount
      theDoc.PageNumber = i
      theDoc.Flatten
Next
theDoc.Save "my pdf folder/filename.pdf"
0
Comment
Question by:NELIXINC
1 Comment
 

Accepted Solution

by:
NELIXINC earned 0 total points
ID: 33597075
I found the solution.

theDoc.Encryption.Type = 2
theDoc.Encryption.CanCopy = false
theDoc.Encryption.Password = "owner"

http://www.websupergoo.com/helppdf7/default.html
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A short article about a problem I had getting the GPS LocationListener working.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now