Prev: print
Next: geoLocator
From: iborsb on 16 Jan 2007 04:21 I get the following problem when trying to use the refactored iText 1.4.6. Class coldfusion.runtime.java.JavaProxy can not access a member of class com.lowagie.textNew.pdf.PdfWriter with modifiers "protected" Im trying to call the following function. pdfWriter.setViewerPreferences(PdfWriter.HideToolbar); Is there anyway around this?
From: PaulH **AdobeCommunityExpert** on 16 Jan 2007 04:45 iborsb wrote: > I get the following problem when trying to use the refactored iText 1.4.6. > > Class coldfusion.runtime.java.JavaProxy can not access a member of class > com.lowagie.textNew.pdf.PdfWriter with modifiers "protected" > > Im trying to call the following function. > pdfWriter.setViewerPreferences(PdfWriter.HideToolbar); > > Is there anyway around this? short of doing some java wrappers, nope. it's the "protected" bit.
From: iborsb on 16 Jan 2007 05:11 Thanks Paul I'm looking at trying to make it harder for a user to either alter, save or print a PDF. One way seemed to be through setting viewerpreferences and removing all the tool bars. The other way is to set permissions and not allow printing. Have you any examples of how to do this?
From: PaulH **AdobeCommunityExpert** on 16 Jan 2007 06:50 iborsb wrote: > I'm looking at trying to make it harder for a user to either alter, save or > print a PDF. One way seemed to be through setting viewerpreferences and > removing all the tool bars. The other way is to set permissions and not allow > printing. > > Have you any examples of how to do this? no, not offhand but you *can* either set user permissions when you create the doc via PdfWriter setEncryption method or read in an existing PDF & "stamp" encryption on it via PdfStamper setEncryption method (or use PdfEncryptor class encrypt method). note that for all these methods you'll need to add a password to the PDF.
From: iborsb on 25 Jan 2007 11:24
Hi Paul I've come up with the following newPDF=createObject("java","java.io.FileOutputStream").init(expandPath(finalOutP utFile)); pdfStamper=createObject("java","com.lowagie.textNew.pdf.PdfStamper"); newPDF=pdfStamper.setEncryption('','',AllowPrinting,0); Is that even close? Currently, I get an AllowPrinting is undefined error. The notes suggest that the command should accept an int and yet the options inlude allowprinting etc.. |