Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ABCpdf7 Psssword Protect Files?

Posted on 2010-09-03
1
493 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

840 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