i used this great plugin for years but recently i switched to a WordPress FSE block theme.
Is it possible to create or get a shortcode to embed “mpdf_pdfbutton();” within a WordPress block or shortcode block so i can use the plugin with the WordPress Website-Editor?
I just added the short-code mpdfbutton to the upcoming 3.9 plugin release. I am not 100% sure if its going to work for your use-case but please let me know.
I just tested it but unfortunately the button is not shown or rendered…
I embedded the shortcode as any other but the only thing happening is the WordPress writes the word “mpdfbutton” into the website. Do i miss something?
Hmm I tried adding [mpdfbutton] into a post article and it worked. Do you have documentation about the block system you are using? Also did you made sure to update to version 3.9
Ok glad it works. There are a couple of arguments but none to allow you to change the PDF icon size.
To for example open in a new tab you can try [mpdfbutton opennewtab=1]
As for images not showing up I recommend looking through this support forum and your PHP error logs. In most cases it is because of missing permissions in the cache folder or some other limitation that prevents the PDF library from downloading/accessing the images.
Open in a new tab works like charm. The rest (images, icon size) could be figured out by myself. I create a custom “default_de.php” and sized the icon with CSS.
Everything works great now!
I cannot tell you enought how precious your plugin is. It’s a very good solution for creating PDF from posts. Lightweight and based on open standards. The core of the internet. Thank you for all your work!