Groups
Sign in
Groups
Google Apps Script Community
Conversations
Labels
About
Send feedback
Help
Reg: Pdf rendering in iframe is blocked in chrome
232 views
Skip to first unread message
Dora Samy
unread,
Sep 20, 2023, 12:56:12 AM
9/20/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
I have a webapp which renders pdf for users in an iframe.
It is getting blocked by chrome/edge but can be seen in firefox.
I am using pdf-lib for the same.
Any thoughts why it is getting blocked? and anyone had the same issue at any point of time?
cwl...@gmail.com
unread,
Sep 21, 2023, 5:52:41 AM
9/21/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
Be sure that if you are rendering the iframe using HTMLService that you explicitly set the
XFrameOptionsMode
to
"
ALLOWALL
"
See if that helps at all.
Dora Samy
unread,
Sep 21, 2023, 9:34:28 AM
9/21/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
Hi Crawford,
I am directly using
<
iframe
id
=
"embpdf"
style
=
"width: 90%; height: 90%;"
></
iframe
>
const
pdfDataUri
=
await
doc
.
saveAsBase64
({
dataUri
:
true
});
document
.
getElementById
(
'embpdf'
).
src
=
pdfDataUri
;
this is perfectly working in firefox. but getting blocked in others. But there is no error as such in console?
and the same iframe working perfectly in normal local. Only if it is deployed as google webapp. this issue crops up.
Reply all
Reply to author
Forward
0 new messages