-
Notifications
You must be signed in to change notification settings - Fork 2k
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 PDF in new window blocked by browser - IOS / Capacitor #2166
Comments
As described in issue #800 on Safari (iOS) for open action is require disabled popup blocker. |
I'm on capacitor, so my app is running inside a webview. I tried to disable "popup blocker" in safari's option. Same problem, i don't know if my problem is related to capacitor or not. |
Capacitor is not standard browser, this feature is not supported. |
Capacitor is not a browser, it's a framework like Cordova, used to implement web app with ionic. Capacitor is only showing a safari webview. I did some test:
But not working when I start the app through the App icon (capacitor => safari web view). Anyway, i'll dig out. Thanks ! |
hey @mignam, I found a way to download at least for the moment the PDF in the device using pdfmake along with this other solution on this page (using capacitor Filesystem plugin): https://www.pragma.com.co/academia/lecciones/convertir-y-descargar-un-pdf-en-base64-con-iconic-4-y-capacitor, I will leave this sample snippet just for you reference, this is enough to download it:
if you still have troubles let me know, regards. |
Hello,
pdfMake.createPdf(docDefinition)open()
is working fine on browsers but not on ios device. This error is triggered:Error: Open PDF in new window blocked by browser
I'm working on a webapp using Angular 7 and Capacitor.
I saw many posts about this subject and tested solutions but none is working... => #587
Some says that i have to store PDF in local using cordova fileOpener plugin but i don't want to use cordova :) =>
I just want to generate a pdf and open it in another window. I don't know what can be wrong here:
var win = window.open('', '_blank');
pdfMake.createPdf(documentDefinition).open({}, win);
Also,
pdfMake.createPdf(docDefinition).open({}, window)
is working but this is not what i want because pdf is open on my webview :)Sorry if i miss something or if i did something wrong !
The text was updated successfully, but these errors were encountered: