Hi,
I have the following use case that I am trying to resolve but not sure
if the couchbase lite API supports it. My *iOS* app lets users record
textual and image information that is stored on a couchbase lite database
on the user's mobile device. The app lets users add/view/edit/delete
information, all of which works beautifully using couchbase lite. The app
offers the user a feature to export all the data to a PDF file that should
be generated locally (on the user's mobile) so that the user can email the
PDF. Here is where I am stuck with issues in accessing the image data
(stored as a document attachment) to render it on the PDF.
My approach thus far has been to access the image data as raw bytes
using Attachment.content and render it on a UIWebView as a base64 encoded
image and then get the UIWebView object to export the HTML data as a PDF
(all in memory). This is turning out to take a long time (takes in excess
of 10 secs for just a single image) and is CPU intensive. The delay appears
to be occurring in UIWebView in rendering the HTML with base 64 image data.
So my question is if there is a way to access an attachment in
couchbase lite as a direct URL (like file:///....) so that one can
circumvent the entire base64 conversion and rendering stages.
Any help will be deeply appreciated.
Regards
S
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/8ae03ed7-2615-4507-b649-85c099872907%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.