[Mono-list] Render PDF to Image on PC, OSX and iOS?

Jonathan Pryor jonpryor at vt.edu
Sun Jun 19 12:32:31 EDT 2011

[DllImport] isn't restricted to .dll files; it can use any shared library, e.g. .so files on Linux and .dylib files on OSX.

HOWEVER, this doesn't help much on iOS as iOS doesn't allow you to distribute .dylib files with your app; everything must be statically linked.

As a Mono extension, you can use [DllImport("__Internal")] to resolve methods that are located within the calling program (instead of some .dll/.so/.dylib/etc.). You can then use C# conditional compilation (#if) to select between [DllImport("__Internal")] and a "proper" library name for non-iOS platforms.

Then you just statically link your PDF rendering library into your app on iOS and things should (more or less) Just Work.

You also need to ensure that you follow the licenses of all libraries involved.

 - Jon

On Jun 16, 2011, at 2:57 AM, Abe Gillespie wrote:

> There's no way you can't use a C library on iOS.  That just wouldn't
> cut it (obviously I don't have personal experience).  I'm sure Google
> will turn this up for you.
> On Thu, Jun 16, 2011 at 2:50 AM, rygoody <rygoody at gmail.com> wrote:
>> So I understand on OSX and PC I can just use [DLLimport] on the imagemagick
>> dll. But hows it work on iOS? Unless I'm mistaken, I'm not going to get a
>> DLL to use in my iOS app am I?
>> --
>> View this message in context: http://mono.1490590.n4.nabble.com/Render-PDF-to-Image-on-PC-OSX-and-iOS-tp3601451p3601665.html
>> Sent from the Mono - General mailing list archive at Nabble.com.
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

More information about the Mono-list mailing list