encrypting a pdf

  • I have looked around and spent considerable time getting my app to take
    multiple pdfs and combine them.  I don't see any api that allows you to
    take a pdf and encrypt it.  I can't help to think that a natural
    extension of the folks at Apple is to add one simple Cocoa or Quartz
    call to encrypt a pdf.

    I know it does not exist and after downloading the 1400 page specs from
    Adobe, I am a bit overwhelmed.  Anyone have a solution to via Cocoa
    without buying anything and not using Java, you can encrypt a pdf?

    I think it would be a pretty useful and nice feature in the pdf api.
    Anyone know if it exists?
    Jim
  • On Oct 20, 2006, at 4:50 AM, Jim Mooney wrote:

    > I have looked around and spent considerable time getting my app to
    > take multiple pdfs and combine them.  I don't see any api that
    > allows you to take a pdf and encrypt it.  I can't help to think
    > that a natural extension of the folks at Apple is to add one simple
    > Cocoa or Quartz call to encrypt a pdf.
    >
    > I know it does not exist and after downloading the 1400 page specs
    > from Adobe, I am a bit overwhelmed.  Anyone have a solution to via
    > Cocoa without buying anything and not using Java, you can encrypt a
    > pdf?
    >
    > I think it would be a pretty useful and nice feature in the pdf
    > api.  Anyone know if it exists?

    Automator can do it. So maybe a solution is to call an Automator script.
  • You can also use pdftk for it.

    HTH
    Robert

    On 20.10.2006, at 4:50, Jim Mooney wrote:

    > I have looked around and spent considerable time getting my app to
    > take multiple pdfs and combine them.  I don't see any api that
    > allows you to take a pdf and encrypt it.  I can't help to think
    > that a natural extension of the folks at Apple is to add one simple
    > Cocoa or Quartz call to encrypt a pdf.
    >
    > I know it does not exist and after downloading the 1400 page specs
    > from Adobe, I am a bit overwhelmed.  Anyone have a solution to via
    > Cocoa without buying anything and not using Java, you can encrypt a
    > pdf?
    >
    > I think it would be a pretty useful and nice feature in the pdf
    > api.  Anyone know if it exists?
    > Jim
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<robertcerny...>
    >
    > This email sent to <robertcerny...>
  • If you don't mind developing it, it isn't that hard.  I did it, but I
    haven't created an interface for it.

    Encrypt:

    1.  Copy your first PDF into an NSMutableData object.
    2.  Encrypt it.
    3.  Write it out to the single file that will be a combination of all PDF's.
    4.  Write location and size of PDF, as well as encryption info to file.

    5. Repeat for all PDF's.

    Decrypt:

    1. Using your key, find the location, size and encryption info.
    2. Decrypt.

    3.  Repeat for each PDF file.

    As long as you have your encryption thought through, developing this
    really doesn't take long to do.

    I wouldn't rely on others encryption.  If you can't understand it, how
    do you know for sure it really is doing what it's saying?  That's why
    I created my own.
  • On 20 Oct 06, at 11:21, Jordan Evans wrote:
    > If you don't mind developing it, it isn't that hard.  I did it, but I
    > haven't created an interface for it.
    >
    > Encrypt:
    >
    > 1.  Copy your first PDF into an NSMutableData object.
    > 2.  Encrypt it.
    > 3.  Write it out to the single file that will be a combination of
    > all PDF's.
    > 4.  Write location and size of PDF, as well as encryption info to
    > file.
    > ...

    I think he means PDF access protection, not general data encryption.
    Take a look at the options in the Print dialog for PDF output.
  • Actually there is a built in scheme that I believe works in Quartz
    which I looked at through someone's post.  Quartz allows you to create
    a CGPDFContent and during the creation, will encrypt it into one that
    Acrobat accepts,  MD5 or some other one.  All you need to do is give it
    a password and the encryption takes place. At least that is how I read
    it today.....Give me a couple of hours to test it.  Seems like it is
    straight forward.

    this is something that takes place in the app, not some other outside
    mechinism and the hopeful result will not require providing my own
    encryption method, but one that Adobe already supports.

    TBC

    On Friday, October 20, 2006, at 02:21 PM, Jordan Evans wrote:

    > If you don't mind developing it, it isn't that hard.  I did it, but I
    > haven't created an interface for it.
    >
    > Encrypt:
    >
    > 1.  Copy your first PDF into an NSMutableData object.
    > 2.  Encrypt it.
    > 3.  Write it out to the single file that will be a combination of all
    > PDF's.
    > 4.  Write location and size of PDF, as well as encryption info to file.
    >
    > 5. Repeat for all PDF's.
    >
    > Decrypt:
    >
    > 1. Using your key, find the location, size and encryption info.
    > 2. Decrypt.
    >
    > 3.  Repeat for each PDF file.
    >
    > As long as you have your encryption thought through, developing this
    > really doesn't take long to do.
    >
    > I wouldn't rely on others encryption.  If you can't understand it, how
    > do you know for sure it really is doing what it's saying?  That's why
    > I created my own.
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<jim...>
    >
    > This email sent to <jim...>
    >
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today