• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Preview all file type with PDF Embed API

Community Beginner ,
May 17, 2023 May 17, 2023

Copy link to clipboard

Copied

Hi all, firstly please correct me if  I open this post at incorrect location.

 

I have some document and media files stored in AWS S3 bucket. My website is using PHP 7.0 and Jquery
Because Google Doc Viewer limits the max file size to preview at 25MB. So I replace it with PDF Embed API.


This API is only for previewing PDF while I need to preview any file types such as ( doc, docx, csv, xls, xlsx, pdf, png, jpg, jpeg ).


I tried to research and had some ideas that I need to convert all other file types to PDF first, and Adobe Service API can do that ( create a PDF file from other file )


The problem is I feel it's too hard to apply this.
The follow will be: get file from S3 via a public URL -> check file type -> if file type is not PDF -> convert it -> preview that file ( using Embed PDF API )

 

Please help me to have a simple view for that above follow ( eg: what API I should use ,.... )


I would appreciate any ideas. Thank you

 

TOPICS
AWS , General , How to , PDF Embed API , PDF Services API

Views

957

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 17, 2023 May 17, 2023

Copy link to clipboard

Copied

Why not pre-convert things as you add them to the bucket (or in a batch) and present for preview only the PDFs? Live conversion to PDF could easily take so long that the user will wander off to another web site, as well as potentially having a substantial and uncontrollable cost.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 17, 2023 May 17, 2023

Copy link to clipboard

Copied

Hi, thanks for your response.
Firstly, I want to keep the original file type so that user can download it instead of storing 2 file types or just pdf type.
I can see some services can convert it quickly (they convert my file to PDF or PNG file to preview). We can let user know the file is preparing to preview by showing a notification, user can wait in 1 or 2 minutes, but if the conversion proccess takes too long as you mentioned, then I need to find other solutions or services.
Anyway, the purpose of my question is create something like Google Docs View but can preview a file more than 25MB. I just need to preview

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

As stated, you could convert your other items to PDFs, but the Embed viewer won't be updated to support non-PDF items. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

Hi Raymond, Thanks for your response. I agree with your idea. But I would like to convert files automatically by using API or something like that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

So yes, we have an API that lets you convert from Office, HTML, and some image formats. Embed viewer wouldn't do that for you - you would need to write code that looks at your directory of assets, converts them, and is run on some sort of schedule so it handles new images being added there. 

 

All in all, completely doable, just not something I can share in a forum post. Also note our APIs are not free like Embed (although we have a free tier coming).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

I understand what Embed Viewer can do. As I mentioned in the post, I'm going to use your APIs to convert other files to PDF and pay for them. I need to know what I should start. For example: I need to call API A to create job to convert my file. Then I need to call API to check status of that job, Then I call API C to get the converted file URL and use Embed Viewer to preview.
Anyway, thanks for your help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 18, 2023 May 18, 2023

Copy link to clipboard

Copied

Right... I'm confused. 🙂 So are you asking for help? The docs would be best for that. Sorry if I'm not getting your ask here. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

Hi @Raymond Camden  Sorry about late reply. Yes I'm really asking for help. I already read the API document but maybe it's too hard for me to understand all of them. As I said above, I need simple answers for my follow:

1. How to get a an existed file from AWS S3 using Adobe API? Which API can do that?
2. How to convert that file to PDF file? Which API can do that? Where can new PDF file stored after that?
3. The cost for each Convert File request?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 24, 2023 May 24, 2023

Copy link to clipboard

Copied

1) Our API can not work with files on S3. You have to write code to download the binary data and then upload it to our service. You would need to do research on how this is done, but working with S3 has been covered in lots of blog posts, demos, etc, and Amazon's SDKs should make it a bit easy.

2) You need to spend some time on our docs. We cover this here: https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/create-pdf/

3) We document costs in terms of transation (if you do X, it costs Y transactions) here, https://developer.adobe.com/document-services/docs/overview/limits/. As for the literal cost, you would need to reach out to sales and purchase a license, or, wait for our soon to come free tier as it may be enough for you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 25, 2023 Sep 25, 2023

Copy link to clipboard

Copied

LATEST

What @Zhang29926632l2w6 can do is use s3 to get a signed sigaturel url of the file, and have adobe embed preview that url, that would certaintly work. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources