xwikisas / macro-pdfviewer

0 stars 4 forks source link

Displaying PDF files from an external URL can fail sometimes #57

Closed aubincleme closed 7 months ago

aubincleme commented 10 months ago

Steps to reproudce :

{{pdfviewer file="https://www.dfn.de/wp-content/uploads/2021/12/satzungdfn.pdf"/}}


* Save and view

You should get a result similar to the following :

![image](https://github.com/xwikisas/macro-pdfviewer/assets/5938943/5d2cfdc6-3ad7-40b4-a4af-6da24a256815)

This issue targets only the result produced by the first `pdfviewer` macro, pointing to `gsoc.pdf`. For some reason, the PDF Viewer considers that the file argument is an attachment reference and fails to parse it. The second macro call renders properly, even though it's also an external URL.
trrenty commented 7 months ago

Hello @aubincleme , this attachment URL http://dev.xwiki.org/xwiki/bin/download/GoogleSummerOfCode/gsoc.pdf is not valid because it points to a terminal page without a parent. The correct URL would be http://dev.xwiki.org/xwiki/bin/download/GoogleSummerOfCode/WebHome/gsoc.pdf (note the presence of WebHome).

I will close this issue as invalid. Feel free to reopen it if you can reproduce it with other URLs.