DearFlip 3D Flipbook plugin for WordPress uses shortcode to display PDFs. The shortcode can be used in various combinations to achieve your requirements.
Options | Description |
---|---|
id | ID of DearFlip Post or PDF attachment Post |
source | Source of the PDF file. Used as an alternate method for id |
type | Sets the type of lightbox(popup) Possible values are thumb , button (PRO), link (PRO), custom (PRO) |
viewertype | PRO only Sets the Viewer Type for PDF Viewer. Possible values are reader , flipbook , slider |
is3d | PRO only If viewer is flipbook, turns 3D on or off. Possible values are true , false |
height | PRO only Sets height of the embedded viewer. Default value is auto. Doesn’t apply to popup modes. Example values are 100px , 100% |
page (PRO) data-page | Set the page to open at start. Example page=4 open the flipbook at page 4 |
id #
You can add id of the WordPress Flipbook post or WordPress PDF attachment post to create PDF viewer using shortcode.
Example Shortcode: [dflip id="12"][/dflip]
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 shortcode. But without ID, share links won’t work properly. They cannot open the shared page.
Example Shortcode: [dflip source="http://www.abc.com/mypdf.pdf"][/dflip]
Make sure the PDF is accessible and has proper CORS access if the file is from different domain.
Demo: Viewer from Source
With custom id: By using a custom id, non numeric, share URL can retarget the process of opening certain page on load:
[dflip source="http://www.abc.com/mypdf.pdf" viewertype="vertical" type="button" id="custom_test_id"]Source Type with custom ID[/dflip]
type #
With type option you can determine what kind of lightbox(popup) trigger will be created.
Example Shortcode: [dflip id="12" type="button"][/dflip]
Possible values are thumb
, button
(PRO), link
(PRO), custom
(PRO)
Demo:
Shortcode | Output |
[dflip id="12" type="thumb"][/dflip] | LifeStyle Magazine |
[dflip id="12" type="button"][/dflip] (PRO) | LifeStyle Magazine |
[dflip id="12" type="link"][/dflip] (PRO) | LifeStyle Magazine |
[dflip id="12" type="custom"]Custom Text/CUSTOM HTML[/dflip] (PRO) | CUSTOMHTML |
viewertype (PRO) #
Sets the Viewer Type for PDF Viewer.
Example Shortcode: [dflip id="12" viewertype="reader"][/dflip]
Possible values are reader
, flipbook
Demo:
Viewer Type Flipbook Viewer Type Reader/Verticalis3d (PRO) #
If viewer is flipbook, turns 3D on or off.
Example Shortcode: [dflip id="12" viewertype="flipbook" is3d="true"][/dflip]
Possible values are true
, false
height (PRO) #
Sets height of the embedded viewer. Doesn’t apply for lightbox(popup) solutions.
Example Shortcode: [dflip id="12" height="500px"][/dflip]
Example values are 100px
, 100%
Can be confused with thumb popup height. It is set by using CSS https://wordpress.dearflip.com/docs/change-size-of-popup-thumb/
page #
Pro version supports both data-page
and page
. Lite version only supports data-page
.
Set the page to open at start. Example: page=4
open the flipbook at page 4
Example Shortcode: [dflip id="12" page=4][/dflip]
(Pro Only)[dflip id="12" data-page=4][/dflip]