This question is answered. Helpful answers available: 0. Correct answers available: 1.


Permlink Replies: 20 - Pages: 2 [ 1 2 | Next ] - Last Post: 10 Jun 25, 15:56 Last Post By: RobM
breisachers

Posts: 14
Registered: 20-Jan-2025
embedded pdf viewer
Posted: 20 Jan 25, 23:07
 
  Click to reply to this thread Reply
I'm considering using jAlbum. I want to include some pdf files in amongst images and videos. Is there a way to view the contents of a pdf "in place" in an album? I did a quick test locally and the pdf opened separately in the browser. Perhaps there is a pdf-viewer plugin? I tried to find one, but could not find a complete list of available plugins. Lastly, is this the kind of thing that could be done in a plugin? I am an experienced java developer, perhaps I could give it a shot. Thanks.
JeffTucker

Posts: 8,013
Registered: 31-Jan-2006
Re: embedded pdf viewer
Posted: 20 Jan 25, 23:44   in response to: breisachers in response to: breisachers
Helpful
  Click to reply to this thread Reply
I believe that all of the bundled skins show PDF's in the album, not in a new browser window.

All of my skins do, as well. One example among many:

https://jefftucker.jalbum.net/skins/saturn/videos/

ETA: And another, with the PDF shown in an album slide page, rather than a lightbox:

https://jefftucker.jalbum.net/skins/jupiter/videos/
JeffTucker

Posts: 8,013
Registered: 31-Jan-2006
Re: embedded pdf viewer
Posted: 21 Jan 25, 00:00   in response to: JeffTucker in response to: JeffTucker
Helpful
  Click to reply to this thread Reply
JeffTucker wrote:
I believe that all of the bundled skins show PDF's in the album, not in a new browser window.

Had to double-check that. There are several bundled skins that don't handle this gracefully, to wit, Minimal, Plain, and Zigzag.
breisachers

Posts: 14
Registered: 20-Jan-2025
Re: embedded pdf viewer
Posted: 21 Jan 25, 01:01   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I was originally thinking of something that would work in the "grid" view, but now that I think about it more, I see that is not very practical. The examples you point to are very helpful, thanks.
JeffTucker

Posts: 8,013
Registered: 31-Jan-2006
Re: embedded pdf viewer
Posted: 21 Jan 25, 01:57   in response to: breisachers in response to: breisachers
 
  Click to reply to this thread Reply
breisachers wrote:
I was originally thinking of something that would work in the "grid" view, but now that I think about it more, I see that is not very practical. The examples you point to are very helpful, thanks.

The "grid" view refers to the layout of the thumbnails. Those are just JPG thumbnails, regardless of what they take the visitor to. An image has a thumbnail, a video has a thumbnail, a PDF has a thumbnail, and so on. But the visitor doesn't see "the real thing" until he clicks on the thumbnail.
breisachers

Posts: 14
Registered: 20-Jan-2025
Re: embedded pdf viewer
Posted: 21 Jan 25, 02:11   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Thanks for the clarification.
davidekholm

Posts: 3,691
Registered: 18-Oct-2002
Re: embedded pdf viewer
Posted: 21 Jan 25, 12:17   in response to: breisachers in response to: breisachers
 
  Click to reply to this thread Reply
That’s naturally room for improvement. I might put it on the todo to generate thumbnail images of the first page of pdf documents.
JeffTucker

Posts: 8,013
Registered: 31-Jan-2006
Re: embedded pdf viewer
Posted: 21 Jan 25, 12:44   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
That’s naturally room for improvement. I might put it on the todo to generate thumbnail images of the first page of pdf documents.

That's what the THM mechanism is supposed to address. What should be on the todo list is to clean up all of that, so that you can just choose a representing image for any album object, rather than going through the routine of creating a file with the same base name and a fake extension. And with objects that are linked, rather than copied, getting the THM to work is a challenge.
davidekholm

Posts: 3,691
Registered: 18-Oct-2002
Re: embedded pdf viewer
Posted: 21 Jan 25, 18:38   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
davidekholm wrote:
That’s naturally room for improvement. I might put it on the todo to generate thumbnail images of the first page of pdf documents.

That's what the THM mechanism is supposed to address. What should be on the todo list is to clean up all of that, so that you can just choose a representing image for any album object, rather than going through the routine of creating a file with the same base name and a fake extension. And with objects that are linked, rather than copied, getting the THM to work is a challenge.


Yes, it should be simplified.
breisachers

Posts: 14
Registered: 20-Jan-2025
Re: embedded pdf viewer
Posted: 8 Jun 25, 16:48   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I might put it on the todo to generate thumbnail images of the first page of pdf
I'm a bit surprised this doesn't exist. Is there maybe a plugin for it? Or even something outside of jAlbum? Does anyone know of such a thing?
JeffTucker

Posts: 8,013
Registered: 31-Jan-2006
Re: embedded pdf viewer
Posted: 8 Jun 25, 17:47   in response to: breisachers in response to: breisachers
 
  Click to reply to this thread Reply
There are plenty of online conversion tools that can convert a PDF into a series of JPG's, one image per page, like this site:

https://convertio.co/

But there probably isn't a Java utility for doing it, which is what jAlbum must have.
breisachers

Posts: 14
Registered: 20-Jan-2025
Re: embedded pdf viewer
Posted: 9 Jun 25, 01:48   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Actually, there is: https://pdfbox.apache.org/. It includes a command line utility that seems to (basically) work, so I can use it to generate jpg/thm files.

But I'm wondering how difficult this would be to integrate into jAlbum. I am a Java developer -- is this the kind of thing that could be done in a skin? Or in a plugin?
RobM

Posts: 4,013
Registered: 4-Aug-2006
Re: embedded pdf viewer
Posted: 9 Jun 25, 12:53   in response to: breisachers in response to: breisachers
 
  Click to reply to this thread Reply
The easiest way would be to make an external tool to run on a project before making the album. Next would be to make a plugin. Doing it within a skin would not be easy, need the developer to adopt it and would only work, if it did at all, for that skin (or family of skins).
davidekholm

Posts: 3,691
Registered: 18-Oct-2002
Re: embedded pdf viewer
Posted: 10 Jun 25, 13:03   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I think we'd need to integrate this functionality within jAlbum itself. I can have a peek at pdfbox. Would it be fine to simply have jAlbum generate a thumbnail image from the 1:st page of a pdf file?
RobM

Posts: 4,013
Registered: 4-Aug-2006
Re: embedded pdf viewer
Posted: 10 Jun 25, 14:33   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I think we'd need to integrate this functionality within jAlbum itself. I can have a peek at pdfbox. Would it be fine to simply have jAlbum generate a thumbnail image from the 1:st page of a pdf file?
Pdfbox doesn’t seem to be able to generate an image of a page with no images, I might have missed an api call for that but didn’t see anything obvious.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums