Web based family history software

This Help forum is for issues relates to the latest release (1.7.7). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

Question [SOLVED] Media files upload

  • jaru-1952
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #1 by jaru-1952
Media files upload was created by jaru-1952
Is it possible to upload pdf files as media file and connect them. As thumbnail I want to use a jpg of the first page.
If possible, what is the procedure to do that?

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #2 by JustCarmen
Replied by JustCarmen on topic Media files upload
No special steps are required. Just upload the pdf-file as you normally would do with an image.
Upload the thumbnail file as well because webtrees won't automatically generate a thumbnail from pdf files.


Carmen
Designer of the JustLight theme (comes with a light and dark color palette), Fancy Imagebar, Fancy Research Links and Fancy Treeview for webtrees 2


Check my website at www.justcarmen.nl

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago - 7 years 7 months ago #3 by joeysun
Replied by joeysun on topic Media files upload
Sometimes size of the PDF file is an issue. I might compress them if you are counting the megabytes.

I think you can point to a dropbox or cloud storage but might someone else more expert share the details?

Doug
webtrees v2.1.19 at Our Family Tree (Jiapu 家譜/家谱)
PHP Version v8.1.x, LiteSpeed V8.1, MariaDB 15.1 | protected/'hindered' by ModSecurity
Last edit: 7 years 7 months ago by joeysun. Reason: clarity

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #4 by JustCarmen
Replied by JustCarmen on topic Media files upload
For compressing pdf files I often use this online tool: smallpdf.com/ Works very good.


Carmen
Designer of the JustLight theme (comes with a light and dark color palette), Fancy Imagebar, Fancy Research Links and Fancy Treeview for webtrees 2


Check my website at www.justcarmen.nl

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #5 by CCT
Replied by CCT on topic Media files upload

JustCarmen wrote: No special steps are required. Just upload the pdf-file as you normally would do with an image.
Upload the thumbnail file as well because webtrees won't automatically generate a thumbnail from pdf files.


I have a few questions:
  1. What is the format of the thumbnail of a pdf?
  2. What are the file naming conventions for the thumbnail of a pdf?
  3. For an existing pdf (with no thumbnail), should I just upload the thumbnail (eg. ftp) into the appropriate thumbs directory?

Chris at genes.tronsmit.com

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago - 7 years 7 months ago #6 by Gustine
Replied by Gustine on topic Media files upload
1 - A thumbnail is a jpg or a png file (width=100px). For a pdf, that's may be a screenshot of the first page.
2 - BUT the thumbnail has same name and extension as main file. So the thumbnail for my_file.pdf is my_file.pdf too.
3 - Yes.

Online publishing : webtrees 2.1 with Vesta Classic L&F + MagicSunday fanchart + Justlight theme + Fancy Imagebar + sosa²⁰ . Mageia 9 - php 8.2.
Offline editing : webtrees 1.7.
Last edit: 7 years 7 months ago by Gustine.

Please Log in or Create an account to join the conversation.

  • jaru-1952
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #7 by jaru-1952
Replied by jaru-1952 on topic Media files upload
1. Does that mean that I have to rename the screen shot my-file.jpg to my-file.pdf?

Please Log in or Create an account to join the conversation.

  • jaru-1952
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #8 by jaru-1952
Replied by jaru-1952 on topic Media files upload
What ever I do,

I give the name of the pdf file
I give the name of the thumb file (as well as pdf or jpg)

I get the message: Thumbnail must contain images.

Please Log in or Create an account to join the conversation.

More
7 years 7 months ago #9 by kiwi
Replied by kiwi on topic Media files upload

Gustine wrote: 1 - A thumbnail is a jpg or a png file (width=100px). For a pdf, that's may be a screenshot of the first page.
2 - BUT the thumbnail has same name and extension as main file. So the thumbnail for my_file.pdf is my_file.pdf too.
3 - Yes.


That's not quite correct for a pdf file. In the code (addmedia.php) is this comment:

// Thumbnails have either
// (a) the same filename as the main image
// (b) the same filename as the main image - but with a .png extension

A thumbnail must also be an image NOT a pdf file (or even have .pdf as it's extension). So your thumbnail must be a .png file, and ONLY a png, not a jpg.
For example:
Main object: this_is_my_file.pdf
Thumbnail : this_is_my_file.png

Please Log in or Create an account to join the conversation.

  • jaru-1952
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago - 7 years 7 months ago #10 by jaru-1952
Replied by jaru-1952 on topic [SOLVED] Media files upload
Thank you all for your input. The problem is solved.
Last edit: 7 years 7 months ago by jaru-1952.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}