vue-pdf-app icon indicating copy to clipboard operation
vue-pdf-app copied to clipboard

Cannot load two pdf on same page

Open sirmadboy opened this issue 3 years ago • 18 comments

Hi I try to use this to render my pdf. On first page it's works beautifully, but when I try to add more pdf viewer, the second viewer not working, only show blank.

sirmadboy avatar Mar 18 '21 09:03 sirmadboy

Hi! Unfortunately it is impossible to use two instances of pdf viewer. The package repeats the structure of Mozilla's pdf viewer and internally it uses elements ids to implement functionality. That means that only the first pdf viewer can be operable

image

You can check other libraries here and here

sandanat avatar Mar 18 '21 10:03 sandanat

@sirmadboy , do you have any other questions? Otherwise close the issue, please.

sandanat avatar Mar 23 '21 07:03 sandanat

This really should be fixed.. All you would need to do is allow someone to add a prefix to all ids.

adam-javelin avatar Jun 06 '21 20:06 adam-javelin

@sandanat I thought it's possible to have two viewers on the same page by generating custom unique ids for each component instance and sending them to this package like this :id-config="idConfig". While I thought this will fix the issue, it did not.

Do think there is a way to achieve this with the current build?

StemateF avatar Jul 20 '21 12:07 StemateF

Hi! IdConfig prop is used to build custom toolbar. Not for two viewers. It is impossible to use two viewers in current build. I will implement it this month

sandanat avatar Jul 20 '21 12:07 sandanat

@sirmadboy I am down to help you implement this if you need another hand on deck :)

StemateF avatar Jul 21 '21 11:07 StemateF

Do it!

sandanat avatar Jul 21 '21 12:07 sandanat

I think you should add props named group then make it as prefix any event to separate each viewer

synped-dev avatar Aug 28 '21 15:08 synped-dev

Can this library support two pdfs on the same page now?

kingyue737 avatar Oct 09 '21 12:10 kingyue737

Can this library support two pdfs on the same page now?

LiThaM avatar Dec 06 '21 12:12 LiThaM

Any update on 2 instances? Is it in progress or anything? Trying to determine if i will use this package in a project, but this is a big issue for my requirements

x-dragos avatar Jan 15 '22 17:01 x-dragos

It would be so nice if it could. Wouldnt take that much more work.

adam-javelin avatar Jan 15 '22 18:01 adam-javelin

Any update on 2 instances? Is it in progress or anything? Trying to determine if i will use this package in a project, but this is a big issue for my requirements

Hi! Yes, I have just started working on it after a long break. Will be done at the beginning of the next month

sandanat avatar Jan 19 '22 12:01 sandanat

Hello! that is great to hear m8! thanks!

x-dragos avatar Jan 19 '22 17:01 x-dragos

Hi @sandanat , any updates on supporting multiple instances? I am using your app in my project and got stuck because of this limitation. I really appreciate it if you can add support to multiple instances.

eye8 avatar Feb 09 '22 06:02 eye8

Hi @sandanat one thumb up more here for supporting this feature as soon as possible 😄

iglimanaj avatar Mar 14 '22 23:03 iglimanaj

Hi @sandanat, now supporting two same pdf?

LiThaM avatar May 21 '22 09:05 LiThaM

since there is still no support for 2 pdf on page, here is the solution I used. Maybe it will be useful for someone

denozavr avatar Nov 18 '23 18:11 denozavr