[Libreoffice] iOS and convert to PDF

BrianS brians99 at bellsouth.net
Fri Nov 11 14:23:38 PST 2011


>>  >        ./soffice --convert-to pdf foo.docx

>>  Yup. Something like that should be doable relatively soon,

> How do you imagine something like that working? As you probably know IPC
> on
> iOS is restricted in some ways.

>I have no idea;) The command line above was just to give an idea of
>how such functionality can be invoked today on a normal desktop OS,
>not to suggest actually running a process with parameters like that. I
>don't know what IPC you mean here, an iOS app is just one process, it
>can't start subprocesses.

iOS apps can communicate with other apps and can cause them to be launched
by use of custom URLs. If you pass an http:// URL to the openURL API
MobileSafari will be launched and will receive that URL. a mailto: URL will
open mail.app.  I think the Maps app has a google custom URL scheme and will
be launched and show the location specified in the URL. Any app can register
a custom URL with the OS and it will be launched or brought forward from the
background when another app calls openURL: with its custom URL.  So
something like openURL: @"soffice://--convert-to%20pdf%20foo.docx" is
possible. Because of sandboxing one app can't directly access a file that
another app has written.  The file data could be passed as part of the
custom URL, or could be placed on the pasteBoard, or could be sent via a
socket. Having a pair of custom URLs could allow app 1 to call app 2, app 2
processes the info, then app 2 calls back to app 1 to tell it that it's done
and to send the results back.

The Facebook app on iOS uses this scheme to provide a single-signon ability
so a user only needs to sign on to FB once and other apps that access FB can
access the security token that the FB app has stored.

> DId you plan to create an app for document export to PDF, or is that
> just one functionality in some other app? 

I have an existing app that uploads files and I want to allow conversion to
pdf as a feature. It's not a file-conversion app. More of a communication
app.

> Anyway, in either case, to
> use LibreOffice code to load some document and write it out in PDF,
> your code needs call LibreOffice's UNO-based APIs. (Note that figuring
> out how all the UNO "component" stuff should work on iOS where
> everything is statically linked into one binary is a work in
> progress...)

> > I might be interested in including some LO source in my app, if that can
> be
> > made to work technically and within License restrictions. Since I'm
> mainly
> > interested in converting documents is it possible to isolate that code
> to a
> > small part of the codebase?

> Not "small". But large parts of the code will obviously not be needed for
> that.

I have been reading through the OO documentation trying to figure out what
parts I'd need. I guess you're saying that the importers, PDF exporter, and
UNO are required.

Thanks,

Brian

--
View this message in context: http://nabble.documentfoundation.org/iOS-and-convert-to-PDF-tp3498093p3501133.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list