Hi,
I've got this problem:
I've got a VB program that must create a PDF not printable from a PDF file, so I use Adobe Acrobat to open and print my files on PDFCreator printer using the option PDFDisallowPrinting. The new PDF files is printable, even if I use the option PDFDisallowPrinting.... I have this problem with PDFCreator 0.9.8 and 1.0.1.
Where is the error???? Can someone help me?
Thank-you very much....and I'm sorry for my english....
MTV
This is the source code to set the printing parameter:
Set PDFCreator1 = New clsPDFCreator
Set pErr = New clsPDFCreatorError
If PDFCreator1.cStart("/NoProcessingAtStartup") = False Then
Call PDFCreator1.cStart("/NoProcessingAtStartup", True)
End If
Set opt = PDFCreator1.cOptions
With opt
.PDFUseSecurity = "1"
.PDFOwnerPasswordString = "omicron"
.PDFOwnerPass = "1"
.PDFDisallowCopy = "1"
.PDFDisallowModifyAnnotations = "1"
.PDFDisallowModifyContents = "1"
.PDFDisallowPrinting = "1"
End With
PDFCreator1.cClearCache
PDFCreator1.cPrinterStop = True
' Run Acrobat Writer as COM-server
Set g_App = CreateObject("AcroExch.App")
Set g_AVDocument = CreateObject("AcroExch.AVDoc")
If g_AVDocument.Open(ls_fileIn, "") = True Then
Set g_PDDocument = g_AVDocument.GetPDDoc()
nPages = g_PDDocument.GetNumPages()
' Print all pages of the document
Call g_AVDocument.PrintPagesSilent(0, nPages - 1, 0, True, True)
' Close the document
Call g_AVDocument.Close(True)
Set g_AVDocument = Nothing
Set g_PDDocument = Nothing
End If
Call g_App.Exit
Set g_App = Nothing
end if
PDFCreator1.cPrinterStop = False
Sleep (1000)
PDFCreator1.cClearCache
Sleep (300)
While IsPrinterReady = False And PDFCreator1.cCountOfPrintjobs > 0 And IsPrinterError = False
DoEvents
Sleep (100)
Wend