Welcome Guest Search | Active Topics | Sign In | Register

Google Maps not showing up in EO.Pdf Options
Daniel
Posted: Friday, May 30, 2025 8:13:50 AM
Rank: Newbie
Groups: Member

Joined: 5/16/2025
Posts: 5
Hi

I have an issue when trying to convert (HtmlToPdf) Google Maps in EO.Pdf. The space where the map should show up is "just empty/white/transparent". It's important to mention that this happens only for embedded Google Maps (Google Maps Embed API) which is using an iframe. Google Maps generated through the Google Maps Javascript API is looking fine. As Google Maps Javascript API is not rendered in an iframe but is drawing the map in the same document I suspect it must have something to do with the rendering in an iframe but I could be wrong of course.

Example embed.html:
Quote:

<!DOCTYPE html>
<html lang="en">
<head>
<title>Google Maps Embed example</title>
</head>

<body>
<h1>Google Maps Embed</h1>
<iframe id="embed1"
width="500"
height="300"
style="border:5px solid red"
loading="lazy"
allowfullscreen
referrerpolicy="no-referrer-when-downgrade"
src="//www.google.com/maps/embed/v1/place?key=API_KEY&q=Space+Needle,Seattle+WA">
</iframe>
<h1>Google Maps Embed (output)</h1>
<iframe id="embed2"
width="500"
height="300"
style="border:5px solid red"
src="//maps.google.com/maps?q=Space+Needle,Seattle+WA&t=&z=13&ie=UTF8&iwloc=&output=embed"
allowfullscreen>
</iframe>
<script>
setTimeout(() => {
// give it time to render once again
if (typeof eoapi !== 'undefined') {
eoapi.convert();
}
}, 5000);
</script>
</body>

</html>

And the C# code (Using newest EO.Pdf version in Trial mode)
Quote:

var embed = GetHtml("embed.html");
using (var outputStream = File.Open("embed.pdf", FileMode.Create))
{
HtmlToPdf.ConvertHtml(embed, outputStream, new HtmlToPdfOptions
{
BaseUrl = "http://localhost",
TriggerMode = HtmlToPdfTriggerMode.Dual,
MinLoadWaitTime = 5000
});
}


The DebugUI also never shows any content for this page. Only the red borders from the <iframe> are visible. Inspection / DOM wise, the content should be there (divs rendered). Network wise, the scripts, images and icons are all fetched from google.

Any help is much appreciated!

Thanks!
Daniel
eo_support
Posted: Monday, June 2, 2025 3:35:53 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,373
Hi,

We have confirmed this to be an issue. This will be fixed in our next build. We will reply here again once the new build is available.

Thanks!
eo_support
Posted: Thursday, June 5, 2025 12:09:33 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,373
Hi,

This is just to let you know that we have posted a new build that should resolve this issue. Please download the new build from our download page and let us know how it goes.

Thanks!
lucianchen
Posted: Thursday, June 5, 2025 1:57:48 PM
Rank: Newbie
Groups: Member

Joined: 6/3/2025
Posts: 4
Daniel
Posted: Friday, June 6, 2025 3:09:40 AM
Rank: Newbie
Groups: Member

Joined: 5/16/2025
Posts: 5
Hi

I can confirm that latest version 25.2.1 shows the iframe embedded google maps now!

Thanks
Daniel
eo_support
Posted: Friday, June 6, 2025 9:05:32 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,373
Great. Thanks for confirming the fix!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.