• Resolved newslicer

    (@newslicer)


    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

    (@fkrauthan)

    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

    (@newslicer)

    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é

    Plugin Author fkrauthan

    (@fkrauthan)

    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

    (@newslicer)

    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

    (@newslicer)

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

    Thread Starter newslicer

    (@newslicer)

    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 6 months ago by newslicer.
    • This reply was modified 6 months ago by newslicer.
    • This reply was modified 6 months ago by newslicer.
    Plugin Author fkrauthan

    (@fkrauthan)

    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

    (@newslicer)

    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

    (@fkrauthan)

    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.