Blank PDFs when trying to fetch via representations
I am uploading MS Office files doc/docx/xls/xlsx via the Box API. They are able to be retrieved via the API and viewed in the Box viewer just fine. I can even use annotations within the viewer. So far so good.
I am trying to download a PDF conversion of the file via the API using the representations api here:
https://developer.box.com/reference#representations
Again it _appears_ to work, but the downloaded PDF is blank. Is there an intermediary step I need to do in order to download the PDF version of the file?
Here is a sample response from the representations API call:
{ "type": "file", "id": "34***phone number removed for privacy***", "etag": "1", "representations": { "entries": [ { "representation": "pdf", "properties": {}, "info": { "url": "https://api.box.com/2.0/internal_files/34***phone number removed for privacy***/versions/***number removed for privacy***047/representations/pdf" }, "status": { "state": "success" }, "content": { "url_template": "https://public.boxcloud.com/api/2.0/internal_files/34***phone number removed for privacy***/versions/***number removed for privacy***047/representations/pdf/content/{+asset_path}" } } ] } }
If I use the URL:
https://public.boxcloud.com/api/2.0/internal_files/34***phone number removed for privacy***/versions/***number removed for privacy***047/representations/pdf/content/
It does download a PDF file, but the PDF file is empty. I've tried this with several documents and never get anything but a blank PDF.
Has anyone seen this before?
Please sign in to leave a comment.
Comments
0 comments