Conversation
supportDear support, 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? Unfortunately i’m not a good coder… Thanks so much André
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.
That is so great Florian! 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? Please see my screenshots Kind regards, André
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
I made sure that i’m using 3.9 I tried to embed the shortcode in a single post or a single page which did not work either. My wish would be to embed the shortcode into the page template so that it’s shown in any post… So no: it’s not working unfortunately :/
Additional details: I’m using the WordPress standard FSE block theme Twenty Twenty Two.
HOLY! I found the problem. While debugging i disabled the plugin. Shame on me. So bad. I’m sorry. Now it works! The only issues i have left: the PDF does not contain the featured image the button shown a very little Adobe icon. Is there any way to size or change that? Does the shortcode have any parameters? would it be possible to open the PDF in a new window/tab? This reply was modified 2 years ago by newslicer . This reply was modified 2 years ago by newslicer . This reply was modified 2 years ago by newslicer .
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.
Thanks Florian! 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!
Perfect glad it now all works as expected.
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.
That is so great Florian! 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? Please see my screenshots Kind regards, André
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
I made sure that i’m using 3.9 I tried to embed the shortcode in a single post or a single page which did not work either. My wish would be to embed the shortcode into the page template so that it’s shown in any post… So no: it’s not working unfortunately :/
Additional details: I’m using the WordPress standard FSE block theme Twenty Twenty Two.
HOLY! I found the problem. While debugging i disabled the plugin. Shame on me. So bad. I’m sorry. Now it works! The only issues i have left: the PDF does not contain the featured image the button shown a very little Adobe icon. Is there any way to size or change that? Does the shortcode have any parameters? would it be possible to open the PDF in a new window/tab? This reply was modified 2 years ago by newslicer . This reply was modified 2 years ago by newslicer . This reply was modified 2 years ago by newslicer .
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.
Thanks Florian! 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!
Perfect glad it now all works as expected.