WPIntell

Source evidence

Shortcode support?

wp-mpdf · support · 2024-05-23T09:08:00+00:00

mixedsentiment
mediumseverity
0.85relevance
9replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 32 rows with source links

12.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
newslicer resolved
Dear 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.

Comments

9 shown
fkrauthan 2024-05-25T22:42:00+00:00

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.

newslicer 2024-05-26T06:46:00+00:00

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é

fkrauthan 2024-05-26T07:04:00+00:00

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

newslicer 2024-05-26T07:58:00+00:00

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 :/

newslicer 2024-05-26T09:06:00+00:00

Additional details: I’m using the WordPress standard FSE block theme Twenty Twenty Two.

newslicer 2024-05-26T17:43:00+00:00

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 .

fkrauthan 2024-05-27T00:25:00+00:00

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.

newslicer 2024-05-27T05:33:00+00:00

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!

fkrauthan 2024-05-27T05:48:00+00:00

Perfect glad it now all works as expected.