Skip to main content
Participating Frequently
January 16, 2007
Question

Itext Problem

  • January 16, 2007
  • 13 replies
  • 2691 views
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?
This topic has been closed for replies.

13 replies

Inspiring
January 16, 2007
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.

iborsbAuthor
Participating Frequently
January 16, 2007
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?
Inspiring
January 16, 2007
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.