2

How do I digitally sign a PDF with Monotouch or Xcode 4.2?

Xcode 4.2 has its CoreGraphics Framework that allows to work with PDF files but there is no option or function to sign the file.

From this question: IOS SDK programatically generate a PDF file I got a small clue, that with CGPDFDictionary there are some "signing options", but no further details on how to do it. The Apple Developer Reference doesn't help much either.

With Monotouch there is a library called PDFSign which I used in the past with good results. I can´t find the way to use it with Monotouch, because I'm getting an "Internal Compiler Error".

Community
  • 1
  • 1
Anibaru
  • 193
  • 1
  • 2
  • 12
  • PDFSign appears to be a standard .NET library. It will need to be compiled for MT before you can use it in a MT project. – Jason Jan 20 '12 at 19:00

1 Answers1

0

With Monotouch there is this library called PDFSign which i have used in the past with good results

I guess you meant With Mono there is ... ?

PDFSign is likely linked against the full .NET framework and can either:

  • require assemblies/methods that are not available on MonoTouch;
  • pinvoke to native code that is not available on iOS

If you're already a customer of PDFSign (and like the product) then I suggest you to ask them for an MonoTouch version of their product. Depending on what it requires this could be very simple for them (or very hard) - but it won't hurt to ask :-)

Otherwise you can try to find an ObjectiveC library (or sample code) to do the signature and bind (library) or port (sample) it to MonoTouch.

You can also try to adapt an existing .NET PDF library to do the same - but it will likely require a more complex setup, e.g. CoreGraphics (PDF generation + save PDF) + .NET (load PDF + sign PDF + re-save PDF).

poupou
  • 43,413
  • 6
  • 77
  • 174
  • Ok, i´ll try to ask the authors of PDFSign, for a Monotouch compliant library, thanks anyway! – Anibaru Jan 23 '12 at 19:30
  • I asked the guys at PDFSign, and they told me that their library is dependent on some assemblies that are not yet implemented in Mono. So i will try to find some other way, and tell you what i have found. – Anibaru Jan 24 '12 at 17:10
  • @Anibaru by *not yet implemented in Mono* I suspect you mean *not available in MonoTouch* ? since you said you used the library with Mono, right? You can ask them to contact support@xamarin.com and tell us what's missing to ensure we're aware of their need when we plan future version of our products. Otherwise I hope you'll soon find a workable alternative for your needs :-) – poupou Jan 24 '12 at 19:08