PDF Document doesn't load

onemhz shared this problem 6 years ago
Solved

I'm trying to use the "Document" widget to load a PDF, but all I get is a gray square where the PDF should be when I simulate. In the editor, it shows up fine, but during simulation, it seems to append %23toolbar=0&navpanes=0 to the URL, so it can't find the PDF file (the whole URL ends up looking like


<object width="801" height="543">


<param name="src" value="../../external/documents/c572d3ba-1036-4af6-9150-3c273d0c0372.pdf%23toolbar=0&navpanes=0">


<embed width="801" height="543" src="../../external/documents/c572d3ba-1036-4af6-9150-3c273d0c0372.pdf%23toolbar=0&navpanes=0" type="application/pdf">


</object>


Am I doing something wrong or missing a setting somewhere?

Comments (8)

photo
1

Have you tried with the PDF widget that is already available in the widgets list?

photo
1

Yes. Sorry, the PDF widget is called "Document" in my UI. f21368e1c1726bafb134539a4e729e8c

photo
1

Yes, you're right. Is document, not PDF.

photo
1

If you're seeing a grey box in edition mode is because your default browser (IE or Safari) doesn't have the PDF reader plugin installed.

photo
1

I'm seeing the PDF in the editor mode. I'm not seeing it in the simulation. The URL it renders in the simulation seems wrong.

photo
1

Then what happens is you don't have the PDF reader plugin installed in your browser

photo
1

I do have it installed in my browser. If I use chrome's HTML debugger, for example, to remove the "%23toolbar=0&navpanes=0" from the generated PDF URL, it works.

photo
1

You can try to use the HTML widget instead. That way you control the code.