ThemeNcode Docs

Shortcodes included with TNC FlipBook – PDF viewer for WordPress version 11.1 and newer

Estimated reading: 3 minutes

We had a bunch of shortcodes included with older versions of TNC FlipBook – PDF viewer for WordPress. But we’ve streamlined the shortcodes and lowered the number of shortcodes to only 3 from version 11.1 .

However, the previously generated shortcodes will still work, but there’s no way to create those old shortcodes now.

Here are the new shortcodes that come with TNC FlipBook – PDF Viewer for WordPress version 11.1 :

1. [pvfw-embed]

This shortcode allows you to embed already created FlipBook (Using TNC FlipBook > Add New menu) on any post or page. It comes with a few parameters.

  1. viewer_id: This is the id of the viewer you want to embed.
  2. width: This is the width of the iframe that will be embedded on the page.
  3. height: This is the height of the iframe that will be embedded on the page.
  4. iframe_title: The title of the iframe.

An example of the [pvfw-embed] shortcode:

[pvfw-embed viewer_id="6" width="100%" height="800" iframe_title="PDF Viewer" page="5" zoom="page-fit" pagemode="bookmarks"]

[pvfw-link] shortcode allows you to insert a link to an already created FlipBook (Using TNC FlipBook > Add New menu). It comes with a few parameters.

  1. viewer_id: This is the id of the viewer you want to link to.
  2. text: The anchor text that will be used as a link.
  3. class: you can add a CSS class here to the link.
  4. target: Defines the target of the link. Put _blank if you want to open the link in a new tab or use _parent if you want to open the link on the same tab.

an example of [pvfw-link] shortcode:

[pvfw-link viewer_id="6" text="Open PDF" target="_blank" class="pdf-viewer-link" page="5" zoom="page-fit" pagemode="bookmarks"]

[pvfw-image-link] shortcode allows you to insert a link to an already created FlipBook (TNC FlipBook > Add New menu) with an image. It comes with a few parameters.

  1. viewer_id: This is the id of the viewer you want to link to.
  2. upload Image: The anchor text that will be used as a link.
  3. alt_text: You can set ALT Text from here.
  4. link target: defines the target of the link. Put _blank if you want to open the link in a new tab or use _parent if you want to open the link on the same tab.
  5. width: Image width
  6. height: Image Height.
  7. css class: you can add a CSS class here to the link.
  8. image alignment: Image alignment (values: inherit, left, center, right)

An example of [pvfw-image-link] shortcode:

[pvfw-image-link viewer_id="6" img_url="https://dev.local/wp-content/uploads/2023/01/image.png" target="_blank" class="pdf-viewer-link" alt_text="PDF Viewer" width="100%" height="200px" alignment="center"]

Leave a Comment