- Issue created by @evolutec
- ๐ฆ๐บAustralia nigelcunningham Geelong
Would you be able to provide sample data / setup steps where you're expecting hotspots, so that I can just get on with implementing it and testing it for you, please?
Thanks!
- ๐ซ๐ทFrance evolutec
Install "image hotspots" module
create a content type with media field(image)
create a media type(/admin/structure/media/manage/image/display/"hotspotmedia" and select formatter for form dispaly and display to image with hotspots.
On content type form assign entity browser for widget and select hotspotmedia for view mode.
On content type display select field formatter from view display and select hotspotmedia for view mode.create a node and assign hotspot to image field.
Save node.see results with hotspots print on webpage
Try to print but hotspot doesn't appears on print preview or print.Thanks.
- ๐ฆ๐บAustralia nigelcunningham Geelong
The issue is caused by the fact that the image hotspots module generates the hotspots using Javascript in the browser, rather than as part of the page generation. Doing things that way means (among other things) that there's no way for the Printable module to tell that it needs javascript to run, or to tell that it has run before generating a PDF. For some of the PDF generation techniques, there's also no way for us to run Javascript. The exception is the Puppeteer support, which uses headless Chrome. In that case we do have a way to wait for Javascript to run - I used it at a former employer to wait for pagedJS to do its work.
So, I'm sorry to say this but you'll need to get the image hotspot author(s) to modify their module before you'll be able to use it with printable. Ideally, it would be modified so that the HTML and CSS generated include the hotspots, without any need for JS to run.
I hope that's at least a little bit helpful!
- Status changed to Closed: works as designed
5 months ago 11:17am 5 July 2024 - ๐ฆ๐บAustralia nigelcunningham Geelong
You're welcome.
I'll close this issue for now. Hard to pick a 'resolution' but I'll go with "works as designed" since it's not a printable issue. If they do make changes or you want me to revisit the issue, please feel free to reopen it or open another one.