Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open external window in specific target #196

Open
ruempel opened this issue Nov 14, 2022 · 2 comments
Open

Open external window in specific target #196

ruempel opened this issue Nov 14, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ruempel
Copy link

ruempel commented Nov 14, 2022

I can open a PDF document with [externalWindow]="true" in a new window or tab. Using externalWindowOptions I only managed to pass options from windowFeatures documented in https://developer.mozilla.org/en-US/docs/Web/API/Window/open, but I was not able to pass a target to e. g. open the next PDF document in the same window or tab as the first document.

How can I open a PDF document in a specific target window?

If this is currently not possible, I hereby request to add passing the target window as a parameter.

@codehippie1
Copy link
Contributor

@ruempel This is currently not possible. I will add to the list of feature requests. Alternatively, you can send me a PR, and that would be faster.

@codehippie1 codehippie1 self-assigned this Jan 9, 2023
@codehippie1 codehippie1 added the enhancement New feature or request label Jan 9, 2023
@codehippie1
Copy link
Contributor

@ruempel This was easy to address, I was already upgrading to Angular 15, so added a "target" parameter as well. Please look for next release.

Usage like this
<ng2-pdfjs-viewer #externalPdfViewer [externalWindow]="true" openFile="false" [useOnlyCssZoom]=true target="_myWindow"></ng2-pdfjs-viewer>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants