-
Notifications
You must be signed in to change notification settings - Fork 70
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
Print weird behavior on different domain #438
Comments
Actually think that delegating overlay to the renderer is a good idea also, can be the issuer's job to determine what kind of overlay message (if any) to go on top:
On top of that, it makes the decentralised renderer even more "decentralised" it doesn't have to be called through specific sites, ie opencerts.io, to display "correctly". When 3rd party app implementing the iframe prints, they also get the nice overlay by the issuer. |
Shitty issue, am a bit worried about two things:
But then again I don't know how we can solve this alternatively |
On opencerts I think it wouldn't be a problem to detect if the renderer is able to handle such an action (basically just check if the print method is exposed when connecting the iframe). In that case we can default to either the current behavior, either displaying an alert saying printing is not available However using the new version of the renderer, it wouldnt be possible to detect this (everything going through the same function) |
Should we have a iframe api version response? |
It's doable, can also share the list of supported actions |
Ok that solves 1), do you have an opinion on 2)? If not it's just me and @yehjxraymond and we have opposite views on this. |
I have no solution on this unfortunately (we discussed about it yesterday) |
Description
I noticed the behavior of printing is dependent on where the renderer is hosted. For instance on dev.opencerts.io, printing the default cert results in:
However from https://opencerts-development.netlify.com/ the result is different:
=> Background disappears for no reason
Things get worse if you check/uncheck
Header and Footers
orBackground graphics
:My guess is that it depends whether the renderer is deployed under the same domain. For instance the same thing happens for tradetrust demo certificate (the demo renderer is hosted on a different domain)
Proposed solution
I suggest that we delegate printing to the renderer:
A renderer printing itself is available there => OpenCerts/acra-decentralized-renderer#1
After some tests it looks that the printed document is clean and as displayed on the application.
Pros
Cons
Alternate solution
Create a proxy frame. I found this while looking for solution, but there is no certainty that it will solve our styling issues and it will makes the communication with renderer more complex.
The text was updated successfully, but these errors were encountered: