Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

    Thumbs up How to revoke permission to save or copy a PDF file in java

    I have created a pdf file in java with itext.But i need to make the pdf non-editable.this means i need to restricted the save,copy these options.Any body can help me?

  2. #2
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    Your questions is not clear....can u give some code snippet?
    Have fun....
    JAVA FAQs

  3. #3
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

    Default

    I dont have the code, that is what I am looking for...do u know some frameworks or existing code which I can use?

  4. #4
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    well so u r looking for something readymade....I think u need to use google instead...this forum should be able to answer specific questions....I think that way
    Have fun....
    JAVA FAQs

  5. #5
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

    Default

    thanks for ur suggestion...there must be other people in forum who must have faced similar prob? anybody there???

  6. #6
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    let me do some googling for u....it would be easier ;)
    Have fun....
    JAVA FAQs

  7. #7
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

    Default

    thanks .... let me know by tomorrow...

  8. #8
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    u r giving me timelines like a manager...:0)
    Have fun....
    JAVA FAQs

  9. #9
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

    Default

    thats when people take it seriously....;)

  10. #10
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    whts so serious about this...I am just searching...which u cant...
    Have fun....
    JAVA FAQs

  11. #11
    kzvi.kzvi.1 is offline Member
    Join Date
    Oct 2008
    Location
    US
    Posts
    58
    Rep Power
    0

    Default

    The following code makes a copy of an existing PDF and applies certain permissions to it. See the PdfWriter class for the various permissions that are possible.


    PdfReader reader = new PdfReader("my-old-file.pdf");
    PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("my-new-file.pdf"));
    stamper.setEncryption("my-owner-password".getBytes(), "my-user-password".getBytes(),
    PdfWriter.AllowPrinting | PdfWriter.AllowCopy, PdfWriter.STRENGTH40BITS);
    stamper.close();
    Have fun....
    JAVA FAQs

  12. #12
    Join Date
    Oct 2008
    Posts
    68
    Rep Power
    0

Similar Threads

  1. Replies: 3
    Last Post: 05-22-2011, 04:16 PM
  2. Replies: 5
    Last Post: 03-13-2009, 01:45 PM
  3. Replies: 2
    Last Post: 10-05-2008, 07:13 PM
  4. java file copy
    By hknyo in forum New To Java
    Replies: 1
    Last Post: 06-12-2008, 05:42 AM
  5. copy image/imageicon into a file on disk
    By archanajathan in forum Advanced Java
    Replies: 2
    Last Post: 11-22-2007, 07:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •