|
Replies:
14
-
Pages:
1
-
Last Post:
18 Feb 21, 19:06
Last Post By: AndreWolff
|
Threads:
[
Previous
|
Next
]
|
|
Posts:
2,357
Registered:
14-Dec-2007
|
|
|
Bug: Can't use a pdf-file as weblocation
Posted:
10 Feb 21, 10:13
|
|
|
If I add a pdf file as web location and I click on the update button, I get a crash: org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml. Mimetype=application/pdf, URL=https://andrewolff.jalbum.net/VechtSaharaN_FB/routebeschrijving-den-haag.pdf
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:689)
at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:628)
at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:260)
at org.jsoup.helper.HttpConnection.get(HttpConnection.java:249)
at org.jsoup.Jsoup.parse(Jsoup.java:183)
at se.datadosen.jalbum.WebLocation.findRepresentingImage(WebLocation.java:332)
at se.datadosen.jalbum.JWebLocationEditPanel$1$1.doInBackground(JWebLocationEditPanel.java:78)
at se.datadosen.jalbum.JWebLocationEditPanel$1$1.doInBackground(JWebLocationEditPanel.java:63)
at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
The used pdf-file https://andrewolff.jalbum.net/VechtSaharaN_FB/routebeschrijving-den-haag.pdf exists,
This was OK in the past.
It works too correctly with html files.
System Windows 10 and jAlbum 22.1.3
Edit:
This is a bug, so it should be moved to the Bug reports thread.
Edited by: AndreWolff on 12-Feb-2021 10:43
|
|
|
Posts:
111
Registered:
16-Apr-2008
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 12:52
in response to: AndreWolff
|
|
|
Your PDF works as web location without problems in a Tiger test album. (Edge, Windows 10, jalbum 23.1).
Not a current Jalbum bug it seems (your version is not the current?).
What skin do you use?
|
|
|
Posts:
2,357
Registered:
14-Dec-2007
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 13:46
in response to: hanso
|
|
|
Not a current Jalbum bug it seems (your version is not the current?).
I use jAlbum 23.2 on a Windows 10 sytem
What skin do you use?
FancyBox, but it has nothing to do with the skin, I see it also with the Minimal skin en in a new project with the Tiger skin.
|
|
|
Posts:
111
Registered:
16-Apr-2008
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 14:13
in response to: AndreWolff
|
|
|
In your report dated 12 february you mentioned an older version of Jalbum, 22.1.3 and just now 23.2.
That is why I asked about the version.
|
|
|
Posts:
8,240
Registered:
31-Jan-2006
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 14:17
in response to: AndreWolff
|
|
|
A web location should be a web page. A PDF is not a web page - it's just a file.
It does work, as long as you stay away from the Update buttons. Choose New page... web location, and enter a URL, like https://jefftucker.jalbum.net/frenchpress.pdf. But then do not click Update - that's what tells the jAlbum core to visit the web page and try to extract a representing image from it. It won't work, because the PDF is not a web page - there are no images there. Just move down to the Image URL field and choose an image to represent the page. Again, lay off the Update button. Just click OK, and make your album.
ETA: The expected way of showing a PDF in an album is to add the PDF as a regular album object, and then let the skin display it in the album. There should be no need to try to torture the web location routine into handling it.
|
|
|
Posts:
717
Registered:
27-Sep-2003
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 14:41
in response to: JeffTucker
|
|
|
If the PDF file is available locally, yes it should be added as a regular album object.
If it is on a remote web site, it needs to be a web location.
|
|
|
Posts:
8,240
Registered:
31-Jan-2006
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 14:46
in response to: ctwist
|
|
|
If it's on a remote website, you need to download it, then add it to your project.
If a JPG or MP4 is available on a remote site, should you be able to add it as a web location?
|
|
|
Posts:
4,233
Registered:
4-Aug-2006
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 14:56
in response to: JeffTucker
|
|
|
If it's on a remote website, you need to download it, then add it to your project.
If a JPG or MP4 is available on a remote site, should you be able to add it as a web location?
If it is on someone else’s website it shouldn’t be made to appear on your own, at least without permission. The linked file in the first post includes the statement ‘ No part of this publication may be reproduced and / or made public by means of print, photocopy, publication on the internet or in any other way, without the prior written permission of Wandelnet.’ I trust that such permission has been given and is available for jAlbum, should they ask for it, to ensure the content is ok.
|
|
|
Posts:
8,240
Registered:
31-Jan-2006
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 14:59
in response to: ctwist
|
|
|
A PDF file may be dynamic, in which case you want to show the latest version.
Well, as I've explained, you can do that if you really want to. There is no actual problem here. Can we perhaps not beat the damn thing to death?
|
|
|
Posts:
2,357
Registered:
14-Dec-2007
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 17:54
in response to: JeffTucker
|
|
|
It does work, as long as you stay away from the Update buttons. Choose New page... web location, and enter a URL, like https://jefftucker.jalbum.net/frenchpress.pdf. But then do not click Update - that's what tells the jAlbum core to visit the web page and try to extract a representing image from it. It won't work, because the PDF is not a web page - there are no images there. Just move down to the Image URL field and choose an image to represent the page. Again, lay off the Update button. Just click OK, and make your album.
Indeed if I don't click the Update button, it works.
But I think it would be nice if jAlbum suppresses the crash in case a PDF-file or image is selected as weblocation!
|
|
|
Posts:
2,357
Registered:
14-Dec-2007
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 17:57
in response to: ctwist
|
|
|
A PDF file may be dynamic, in which case you want to show the latest version.
Exactly and why should you duplicate a file / web-page which is already available on the Internet?
|
|
|
Posts:
717
Registered:
27-Sep-2003
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 18:05
in response to: AndreWolff
|
|
|
But I think it would be nice if jAlbum suppresses the crash in case a PDF-file is selected as weblocation!
It would be better to disable the update button if the file type is not supported as a web location.
|
|
|
Posts:
2,357
Registered:
14-Dec-2007
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
14 Feb 21, 18:12
in response to: ctwist
|
|
|
It would be better to disable the update button if the file type is not supported as a web location.
Yes that is a better solution!
|
|
|
Posts:
2,357
Registered:
14-Dec-2007
|
|
|
Re: Bug: Can't use a pdf-file as weblocation
Posted:
18 Feb 21, 19:06
in response to: ctwist
|
|
|
A PDF file may be dynamic, in which case you want to show the latest version.
You see that effect in the FancyBox sample album, click on the thumbnails 7 and 8 to see the difference.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|