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

PDF Embed API: Multiple embeds on the same page

New Here ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

Hi!

 

I'm using the PDF Embed API with React. And it's working perfectly when I only have embed on the page. But when I try to add another one on the page I get this error in my network tab.

Tech5EDE_0-1618248939805.png

I'm using the Full Window mode if that helps.

Are there any suggested ways I can solve this issue? 

 

Thank you in advance,

TOPICS
PDF Embed API , PDF Services API

Views

1.6K

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

correct answers 1 Correct answer

Community Expert , Apr 12, 2021 Apr 12, 2021

You'll need to use two different variables for the DC View object and then it will work.

Votes

Translate

Translate
New Here ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

Sorry, I realize that the image is way too small.

 

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 Expert ,
Apr 12, 2021 Apr 12, 2021

Copy link to clipboard

Copied

You'll need to use two different variables for the DC View object and then it will 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
New Here ,
Dec 24, 2021 Dec 24, 2021

Copy link to clipboard

Copied

the same issue is with me, can u please provide me the source code

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 ,
Oct 22, 2023 Oct 22, 2023

Copy link to clipboard

Copied

LATEST

I am able to render multiple embeded pdfs on a single page using IN_LINE embed method, just mounting them on different div ids.  

I admit that i am not sure if this is causing some problems as the pdf's don't render all the time, sometimes reaching 100% and failing with nothing in the UI that would say so.

 

I am using Vue whih has a data object and a variable called adobeDCView.

@Joel3 Do you recommned that we create a new adobeDCView for each embed on the same page?

 

 

 

this.adobeDCView = new AdobeDC.View({
clientId: process.env.VUE_APP_PDF_KEY,
divId: `pdf-view-${index}`,
});

this.adobeDCView.previewFile(
{
content: { location: { url: item.url } },
metaData: { fileName: item.fileName },
},
{
embedMode: "IN_LINE",
showDownloadPDF: false,
showAnnotationTools: true,
enableLinearization: true,
}
);

 

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