Title: Shortcode support?
Last modified: May 23, 2024

---

# Shortcode support?

 *  Resolved [newslicer](https://wordpress.org/support/users/newslicer/)
 * (@newslicer)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/)
 * 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é

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17780993)
 * 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.
 *  Thread Starter [newslicer](https://wordpress.org/support/users/newslicer/)
 * (@newslicer)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17781209)
 * 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
 * ![](https://i0.wp.com/www.videospielgeschichten.de/downloads/mpdfbutton_design.
   png?ssl=1)
 * ![](https://i0.wp.com/www.videospielgeschichten.de/downloads/mpdfbutton_website.
   png?ssl=1)
 * Kind regards, André
 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17781227)
 * 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`
 *  Thread Starter [newslicer](https://wordpress.org/support/users/newslicer/)
 * (@newslicer)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17781281)
 * 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 :/
 *  Thread Starter [newslicer](https://wordpress.org/support/users/newslicer/)
 * (@newslicer)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17781380)
 * Additional details: I’m using the WordPress standard FSE block theme Twenty Twenty
   Two.
 *  Thread Starter [newslicer](https://wordpress.org/support/users/newslicer/)
 * (@newslicer)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17781906)
 * 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](https://wordpress.org/support/users/newslicer/).
    -  This reply was modified 2 years ago by [newslicer](https://wordpress.org/support/users/newslicer/).
    -  This reply was modified 2 years ago by [newslicer](https://wordpress.org/support/users/newslicer/).
 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17782235)
 * 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.
 *  Thread Starter [newslicer](https://wordpress.org/support/users/newslicer/)
 * (@newslicer)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17782418)
 * 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!
 *  Plugin Author [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * (@fkrauthan)
 * [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17782442)
 * Perfect glad it now all works as expected.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Shortcode support?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mpdf.svg)
 * [wp-mpdf](https://wordpress.org/plugins/wp-mpdf/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mpdf/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mpdf/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mpdf/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mpdf/reviews/)

## Tags

 * [block](https://wordpress.org/support/topic-tag/block/)
 * [fse](https://wordpress.org/support/topic-tag/fse/)
 * [plugin](https://wordpress.org/support/topic-tag/plugin/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 9 replies
 * 2 participants
 * Last reply from: [fkrauthan](https://wordpress.org/support/users/fkrauthan/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/shortcode-support-44/#post-17782442)
 * Status: resolved