Viewing a pdf using an iFrames card

Following an old thread (HA and adding a PDF viewer - #2 by ondras12345) I’ve had some success displaying a pdf file, but it is highly browser dependent. So far only Firefox displays it properly and scrolling works (its a long pdf document). Chrome displays “Chrome has blocked this file” and Safari on an iPhone just shows the 1st page of the pdf. Edge doesn’t work either.
I have tried 2 set-ups:

type: iframe
url: /local/AppledoreTides.pdf
aspect_ratio: 120%
allow_open_top_navigation: true
title: Test

and also referencing the pdf via an HTML file:

<!DOCTYPE html>
  <iframe src="" width="100%" height="100%">

The errors are a bit different, but both only work on Firefox

1 Like