Max
Have you figured this out? I am looking for someone to build me a PDF to
Image conversion tool using GAE. Are you interested?
Mike
On Thursday, March 15, 2012 4:16:44 AM UTC-6, Max wrote:
>
> Dear All,
> I'm always storing the img I receive in the blobstore using this code:
>
> class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
> def post(self):
> upload_files = self.get_uploads('File')
> blob_info = upload_files[0]
> fotos = FOTO()
> fotos.link = blob_info.key()
> fotos.Tlink = images.get_serving_url(fotos.link, 94)
> fotos.Glink = images.get_serving_url(fotos.link, 800)
> fotos.put()
>
> Now I receive a PDF and I have to store an IMG.
> And I'm thinking to use the conversions tool as per below.
>
> from google.appengine.api import conversion
>
> # Create a conversion request from HTML to PNG.
> asset = conversion.Asset("text/html", "<b>some data</b>", "test.html")
> conversion_obj = conversion.Conversion(asset, "image/png")
>
> result = conversion.convert(conversion_obj)
> if result.assets:
> # Note: in most cases, we will return data all in one asset.
> # Except that we return multiple assets for multiple pages image.
> for asset in result.assets:
> doSomethingWithAsset(asset.data)
> else:
> handleError(result.error_code, result.error_text)
>
>
> My question is:
> How can I store the asset? Could I still use the way I was?
>
> Thanks
>
> Max
>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/CAg65cARtncJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.