How to get pdf content by using API?
Hi all.
I'm trying to get pdf content by using "https://api.box.com/2.0/files/:fileid/content".
But when I excecute this api, it return garbled text like below image.
Is there anyone who have any idea about this problem?
Thanks.
-
Hi
Please review the reference. https://developer.box.com/reference/get-files-id-content/
The API endpoint https://api.box.com/2.0/files/:fileid/content will return a location header with a URL that you need to download the binary file from. If it is a PDF it should give you a response header 'application/pdf' and you should be able to download the PDF to your file system. What you show looks like the raw text of the pdf so maybe you are just outputting the binary file rather than downloading it?
Rgds
Peter Christensen, Platform Solutions Engineer, Box
投稿コメントは受け付けていません。
コメント
1件のコメント