CPCWiki forum

General Category => CPCWiki Discussion => Topic started by: SerErris on 18:16, 05 November 23

Title: How to include PDF document preview in a Gallery?
Post by: SerErris on 18:16, 05 November 23
Hi, I am trying to add the new CPC464 schematics to the schematics page here, but the file is only showing as ADOBE logo. Even the file page itself is showing no preview of the pdf document.

Is there any way to provide that to show a thumbnail of the original document?

Also I would like to directly open the media file instead of the file page.

https://www.cpcwiki.eu/index.php/Schematics#CPC_Classic_Schematics
Title: Re: How to include PDF document preview in a Gallery?
Post by: Gryzor on 18:31, 05 November 23
Will take a look tomorrow. Not sure a preview would be beneficial, mind you, but I'll try to make it work. No promises though as the version we're using is rather old... 
Title: Re: How to include PDF document preview in a Gallery?
Post by: SerErris on 18:51, 05 November 23
I also uploaded a png version that is 600 dpi, but for that the thumbnail generator fails because it is more then 12.5MP 
Title: Re: How to include PDF document preview in a Gallery?
Post by: Gryzor on 09:03, 06 November 23
Now you're stretching it :D
Title: Re: How to include PDF document preview in a Gallery?
Post by: eto on 10:36, 06 November 23
Quote from: SerErris on 18:51, 05 November 23I also uploaded a png version that is 600 dpi, but for that the thumbnail generator fails because it is more then 12.5MP 
Maybe use a PNG with "only" 2400x1600 (or similar) and add an optional PDF high-res download below.
Title: Re: How to include PDF document preview in a Gallery?
Post by: SerErris on 13:59, 06 November 23
That is already to low resolution. If you zoom in, you already have blurred characters.

See the _small version attached.

The "large" version is only 880kb as I use only 4 bits per pixel.
Title: Re: How to include PDF document preview in a Gallery?
Post by: SerErris on 14:00, 06 November 23
And the thumbnail generation works just fine here :-)
Title: Re: How to include PDF document preview in a Gallery?
Post by: eto on 14:57, 06 November 23
Quote from: SerErris on 13:59, 06 November 23That is already to low resolution. If you zoom in, you already have blurred characters.
I think it's still fine even if it's a bit blurry. Much better than the original scans. If you look at it on a screen you will anyway rarely zoom in to 100%. And if you need the full quality you can download the PDF. 

Great work. Thanks a lot. 
Title: Re: How to include PDF document preview in a Gallery?
Post by: SerErris on 15:42, 06 November 23
Still I cannot embed it in any good way into the wiki. 

The wiki is a gallery and I do not want to destroy its appearance with additonal links that are then overlooked. The thumbnailed versions are the ones people will click and than they will never find this new version, even if it is just right below the galery.
Title: Re: How to include PDF document preview in a Gallery?
Post by: Gryzor on 17:18, 06 November 23
Sadly I didn't have the time to check it, hopefully tomorrow.

But... would a tiny preview do it any justice anyhow? How would it be better than the generic Adobe thumbnail?
Title: Re: How to include PDF document preview in a Gallery?
Post by: SerErris on 20:02, 06 November 23
Because people can directly see what it is. Like with the other thumbnails.

Looking at Mediawiki directly it should be possible to create galleries with PDFs, not sure what wiki version is required.

And the best option would be to directly have a link to the .svg file, which also should work.

It looks like it requires Extension:PdfHandler 
https://m.mediawiki.org/wiki/Extension:PdfHandler
Which requires Mediawiki >1.41 which we do not have right now.

And SVG requires this:
https://m.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Administration#SVG


Looks like a bigger Endeavour to update Mediawiki first end then do the rest.

I could help if you want.


Title: Re: How to include PDF document preview in a Gallery?
Post by: SerErris on 22:33, 16 November 23
@Gryzor did you have any time to check the wiki software if that is possible?
Title: Re: How to include PDF document preview in a Gallery?
Post by: Gryzor on 09:26, 17 November 23
Yup, there's a plugin that can do that but it's not compatible with our current version. When we update...
Title: Re: How to include PDF document preview in a Gallery?
Post by: SerErris on 14:44, 17 November 23
Okay, afaik if we update, we do not need the plugin anyways as it is a standard functionality of mediawiki (above version xx).
Powered by SMFPacks Menu Editor Mod