Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF thumbnail preview #15097

Open
paaljoachim opened this issue Apr 22, 2019 · 5 comments
Open

PDF thumbnail preview #15097

paaljoachim opened this issue Apr 22, 2019 · 5 comments

Comments

@paaljoachim
Copy link

@paaljoachim paaljoachim commented Apr 22, 2019

Is your feature request related to a problem? Please describe.

I have a client who is giving me PDF magazines to upload to their site.
First of all I am not sure of a clear way forward to show PDF links or thumbnails.
I tried the Media & Text block but that does not work with PDF files.

Describe the solution you'd like

I would like an easy way to add a pdf file and a preview of the front cover.
Perhaps using the Media & Text block. We have blocks for images, galleries, audio and we can also easily embed videos. As there is no general Media block to where we can add any media that also can create a preview. Perhaps we need a PDF block to where we can choose a link or preview thumbnail.

Describe alternatives you've considered

I end up following this process:
Open the PDF and take a screenshot of the front cover. Bring the image into Photoshop and readjust the size. Upload the PDF and front cover jpg. Add the jpg as an image block. Then add a custom link through the front cover jpg to the PDF file. As there are multiple PDF magazines. I could not use gallery as there is no way to link to each individual magazine, so I had to add an image block then align it left. There are now 3 image blocks aligned left. Aligning images left or right creates a bit of chaos when adding another block below (because of how aligning something left/right works as an image wrap). So I added the new group block to house the 3 image blocks. That did not work out to well.

Here is a 4 minute video I made showing the process: https://youtu.be/GI9EJJmzEuI

Associated issues:
#8322
#2195

@jorgefilipecosta

This comment has been minimized.

Copy link
Member

@jorgefilipecosta jorgefilipecosta commented Apr 22, 2019

Hi @paaljoachim, would use the columns block and adding each image in a column fit your use case?

@paaljoachim

This comment has been minimized.

Copy link
Author

@paaljoachim paaljoachim commented Apr 22, 2019

Hello Jorge

I just tested columns and that works fine. Thanks for the reminder!
Have a great evening!

@paaljoachim

This comment has been minimized.

Copy link
Author

@paaljoachim paaljoachim commented Apr 23, 2019

Bottom line is having a simple way to have a thumbnail preview of a PDF then using the preview to link directly to the PDF.

@idea--list

This comment has been minimized.

Copy link

@idea--list idea--list commented May 16, 2019

Yes, placing PDF the expected way is a too complicated for the average user.
I guess designers thought of the "image" or "cover" block type for placing pdfs in the content.
However in that case you need to place a "custom link" on them and for that you need to know where to grab that link (most users tend not to be able to find that in the media library...).

As mentioned there is a built-in automatic cover image generation for PDF files but that works only if the server uses imagick. But even in that case it is not straightforward to show them up using GB. In that case why actually generating cover images automatically?

Another solution might be the "file" block type but that just places a text link and a DL button.

Or one could consider to use PDF-viewing services but those send cookies...so you need to update your cookie-policy in advance...

Would be really nice to solve all that with a toggle called "show cover" in the right sidebar for the file block type. That way there are no cookies involved and the average user does not get lost looking for the link while needing to click 5-6 times here and there.

@wpfangirl

This comment has been minimized.

Copy link

@wpfangirl wpfangirl commented Dec 10, 2019

It seems like a mistake not to make use of PDF thumbnails, since WordPress is already generating them. It really shouldn't require two steps to insert a PDF thumbnail that links directly to the PDF. In the Classic Editor you can select a thumbnail size when inserting a PDF (at least, you can if you have the Display All Image Sizes plugin installed).

You can't use an image block for PDFs because the PDFs don't show up at all in the image block (reasonably, I suppose, given they are not images, but tweaking that block to allow PDFs in addition to images could be a solution).

That makes the File block pretty much the only option for inserting a PDF. I tried inserting the PDF thumbnail as an inline image in a file block. The result is horrible and it requires too many steps.

I ended up creating an ACF block to display PDFs with their thumbnails, and that will work fine for me, but somehow, with 15 gazillion different embed blocks (way more complexity than the classic editor), we don't have one for "document."

Many of my clients produce hundreds of PDFs and want them on their websites. They shouldn't have to go through multiple steps to add a linked thumbnail of the document to a page or post. It wasn't optimal in the classic editor, but it's a veritable nightmare now, and an example of a place where the block editor provides less functionality than the classic editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.