ShortCode Options

OptionsDescriptionRemarks
idID of DearPDF Post or PDF attachment PostLite & Pro
source
Source of the PDF file, Use if id is not available.
Lite & Pro
type
Sets the type of lightbox(popup)
Possible values are button, thumb, link, custom
button is available in Lite version
viewertype
Sets the Viewer Type for PDF Viewer.
Possible values are reader , flipbook
Upcoming (PRO)
is3d
If viewer is flipbook, turns 3D on or off.
Possible values are true, false
Upcoming (PRO)
height
Sets height of the viewer. Default value is auto.
Example values are 100px, 100%
Upcoming (PRO)

id #

You can add id of the Flipbook post or PDF attachment post to create PDF viewer using dearpdf shortcode.

Example: [dearpdf id="12"][/dearpdf]

Id of other posts will not create any viewer. It will result in: ERROR: Set a Valid Document Source.

source #

Instead of ID, you can add source URL PDF file to create PDF viewer using dearpdf shortcode.

Example: [dearpdf source="http://www.abc.com/mypdf.pdf"][/dearpdf]

Make sure the PDF is accessible and has proper CORS access if the file is from different domain.

type #

With type option you can determine what kind of lightbox(popup) trigger will be created.

Example: [dearpdf id="12" type="button"][/dearpdf]

Possible values are button , thumb (PRO), link (PRO), custom (PRO)


viewertype (PRO) #

Sets the Viewer Type for PDF Viewer.

Example: [dearpdf id="12" viewertype="reader"][/dearpdf]

Possible values are reader , flipbook

Demo:

Viewer Type Flipbook
Viewer Type Vertical

is3d (PRO) #

If viewer is flipbook, turns 3D on or off.

Example: [dearpdf id="12" viewertype="flipbook" is3d="true"][/dearpdf]

Possible values are true, false


height (PRO) #

Sets height of the viewer.

Example: [dearpdf id="12" height="500px"][/dearpdf]

Example values are 100px, 100%


15 thoughts on “ShortCode Options”

  1. How can I set the button label text? I do not want it to be the same as the post title. I thought there would be an option in the shortcode like title=’Performance’. What are my options?

  2. I did try that because I figured it should work that way, but it shows the title of the post and text within the shortcode. So it displays PerformancePerformance on my button.

  3. When using two shortcodes on the same page It only displays the last one. Both are different when displayed separately. When together January 12 looks like January 5

    [dearpdf type= "link" source= "https://xxx/wp-content/uploads/E_Editions/2022/LOL/landolakes011222.pdf"]January 12, 2022[/dearpdf]

    [dearpdf type= "link" source= "https://xxx/wp-content/uploads/E_Editions/2022/LOL/landolakes010522.pdf"]January 5, 2022[/dearpdf]

    Source= fits my needs, but not working the way I think it should.

      1. Notice: Undefined index: thumb-layout in /var/www/vhosts/bertvogels.nl/httpdocs/wp-content/plugins/dearpdf-pro/dearpdf-pro.php on line 860

        I see this line on my website, what is wrong?

      2. Hi,

        is this working on PRO version?

        viewertype
        Sets the Viewer Type for PDF Viewer.
        Possible values are reader , flipbook Upcoming (PRO)

        We need this usage:

        [dearpdf source= "https://www.website.com/link-to-pdf.pdf" viewertype="flipbook"]

        Cheers

Leave a Reply

Your email address will not be published.