Cant Open multiple instances of ngx-extended-pdf-viewer - pdf

I am facing issues while using ngx-extended-pdf-viewer.I am displaying a pdf using this component.
And at the same time I want to display another pdf in a pop using ngx-extended-pdf-viewer.
The first pdf shows up fine but when I want to view another pdf in a pop up ,the pop up shows a blank screen and the pdf is viewed in the background that is it replaces the first pdf.
I want to view the two pdf's at the same time and the second pdf should view in the pop up.
How can I resolve this?

Short answer: that's not possible. The base library, pdf.js, pollutes the global name space, so there's only one instance of the PDF viewer at max.
But: I believe you can wrap ngx-extended-pdf-viewer in a web component. I haven't found the time to test this, but that should solve the problem.

Related

Extract PDF coordinates using mouse click

I want to extract the coordinates of a PDF document with the help of a mouse click. I have gone through some posts but since I'm new to this, I'm not being able to understand it properly. Also, can this be done if I render the PDF file in a web page?
You can add javascript to a pdf document. Although you only get access to a limited subset of the language.
If you only need the coordinates once (for instance when doing layout of the document), you can simply open it with adobe and activate the rulers/grid option to see where your mousepointer is currently located.

Print preview of my web page to pdf and save it on server side programmatically

I have a deceitfully difficult problem which I had thought it was easy one at the beginning and yet I have spent more than 3 days on and off in total.
what I simply need to do is to save the print preview of the page to PDF file on server side from code behind initiating by a button click.
I was expecting using an open source and then I thought there would be a code like xyzopencode.savepasgeaspdf(path) but I could not find it. I got really close to solution by saving the PDF but then I realized it did not save the picture it only saved the strings.
I tried the pdfsharp but as long as I see it draws the whole thing from scratch and I am nor sure if I can do it.
The reason I need picture compatible one is I have 3rd party signature controller on my page and my couple of attempts worked without them or any picture but when I added pictures they failed to show to picture or did not create the PDF at all. The perfect solution would be just saving what ever shows up in the print preview as PDF, just like the built in feature of Google chrome (but on server side).

Is it possible to have a hyperlink open in a new tab that is inside a pdf that is inside of a frame in classic asp?

I Have a classic asp site i am working on. The page has two frames one directly below the other. A Customer has to be able to view a pdf to continue onto the next page. To get to the next page they have to click on a hyper link inside of the pdf that is being viewed. If they cannot see the pdf then they have to download adobe reader which i have included a link to in the top frame.(The top frame has some text and the link) now the bottom frame(contains the pdf) this works fine except when i click the link that is in the pdf the page then opens in that same bottom frame that contained the pdf. It needs to be target _blank. Or whatever you would call it to basically either over ride the two frames and just open in the browser or open in a new tab or window which i cant get either to do. This problem is in IE and Firefox but in chrome it over rides the two frames and opens correctly. Is there any way to get this to occur in IE and Firefox?
I've found this resource about your issue:
http://forums.adobe.com/thread/853394
They say there's no target attribute to set. But they think (and i also think) that if you place a :
javascript:window.open('http://yoururl.com');
it should work, always if you can accept the security alert message (Abobe PDF is trying to execute a script... blah blah)
If your continue reading carefully it seems they solved the problem using Adobe scripting inside inDesign
Hope this helps...

Extract screenshot or picture of portion of PDF using VBA or VB and Adobe SDK

I am currently using an excel macro (although I will switch to VB.NET if necessary) to loop through all of the text in a PDF and populate an array with certain portions of the text in the PDF (via the Adobe SDK and getPageNthWord). This part is working just fine, but now what I want goes a step further.
There are certain portions of the PDF where just grabbing the text isn't giving the full picture, and I'd like to see what more I can get. This is exactly the screenshot or snippet I am trying to get:
So, I know that I could use getPageNthWordQuads to find the coordinates for the words "Compliance Warning" and I could figure out a way to find the bottom right of the screen as well, but my problem starts there. After I get those coordinates what would I do with them? Can I zoom in the PDF to only see that portion and then take a screenshot? I already have the code for a screenshot of the activewindow, but I don't know how to scroll or zoom on a PDF.
Any help would be greatly appreciated. A fresh approach would be welcome as well. Thanks!
There are probably a number of approaches that would work - I don't know enough about your environment / constraints to know for sure which would work best. I'm assuming you are talking to Acrobat through OLE here.
1) You can open a window, get its AVPageView and ask it to zoom and move to where you want it to do your thing.
2) You can open a PDF document in one of your own windows using OpenInWindowEx and then grab the contents of that window (the advantage being that this window could be off screen).
3) You can use the DrawEx method (in AcroExch.PDPage) to render a specific portion of a page into your own window and then process that.

Is there a way to display a PDF in an asp.net webpage without frames?

I have a PDF document that needs to be pulled up in the browser, edited, and saved. I can save via the embedded adobe toolbar, along with all the other acrobat functions. But, what I am trying to see is if there is a way to display the PDF in a webpage alongside web controls.
For example, in the top part of the webpage I have a dropdownlist. It has a list of PDFs. I select one and the bottom part of the webpage opens up with the PDF.
Thanks.
Are you looking for something like Scribd's iPaper viewer?
You can embed it on your site or host with them.
This is typically done with an iframe.
Sorry, you'll have to use either Frames, or iFrames. Perhaps you can also get it via an <object> tag, but that might get browser-specific.
I would contact the people at ceTe (makers of DynamicPDF). Their product permits you to dynamically replace your page output with a PDF file but this involves changing the entire page (the mime-type will be pdf). Is it possible to output the page to a panel instead? I don't think so, but they would be the people I would turn to.