Category Archives: CalendarScripts

Using The Free PDF Bridge Plugin in WatuPRO and Namaste! LMS

From version 4.1.8, in addition to DocRaptor, WatuPRO supports free PDF generation via the PDF Bridge plugin. It uses the MPDF library and is capable to parse rather complicated designs and texts different languages.

(Now also available for Namaste! LMS)

Download The PDF Bridge Here (version 2.0.3, 47 MB – for PHP 8+)

Download The New PDF Bridge Here (version 1.9, 8 MB – for PHP 7.3+)

Older PHP version users can still use version 1.4.3. See also the note about fonts at the bottom of this page.

If you have problems with broken fonts in the PDF see below.

Note: this file is big and uploading through your WP Admin -> Plugins page may not work. In such case you need to upload the unzipped folder by FTP or upload the zip from your hosting control panel account.

Install the plugin and activate it. Then in your Certificates page, under the certificates you’ll see options to generate PDFs either through DocRaptor or the free plugin. That’s all you need to set up.

From PDF Bridge version 0.4 and WatuPRO version 4.6.2.1 and above you can also set up page size and orientation in the Add / Edit Certificate page:

pdf-settings

From version 1.0 the bridge also supports placing a background image.

In Namaste! LMS these options will appear if you have installed PDF Bridge version 0.7 or newer.

Troubleshooting

  1. Images do not appear in certificates or you are getting an Image not found error. Almost always this is a problem with DNS configuration on your server: it does not resolve correctly to localhost. You have two options:
    a) Upload your image on a different domain and link to it.
    b) Contact your hosting support or server admin to fix the DNS misconfiguration. More information about this can be found here.It’s also possible that there is a permissions issue with your server configuration: many webmasters or server admins make wp-content folder not accessible for scripts and MPDF can’t fetch the images from it. In such cases you should either remove the limitation (usually from your .htaccess file) or copy the images to the root of your site and change the paths in the certificate.
    From your main Settings page, PDF Bridge menu link you can switch off and on showing image errors.
  2. Other design issues. MPDF library is capable to convert most properly written HTML code into PDF but there is no guarantee that every possible design will be converted. If you experience problems you need to check the MPDF documentation or try different approaches in your HTML code. We are not the authors of MPDF and can’t provide assistance with such issues.
  3. Blank page / server errors. Note that MPDF requires the PHP mbstring extension to be enabled. Not having mbstring is the most common reason for errors. If your case is different you must obtain information about the exact error caused from the server error log or from errors shown on the screen.

Regarding fonts:

To keep the bridge size reasonable we are using a stripped version of the MPDF library including only the essential fonts. If you need all fonts (for example for Chinese, Japanese languages, etc) you have two options:

  • To use version 1.4.3
  • To manually download the fonts from this page and upload them in folder pdf-bridge/lib/vendor/mpdf/mpdf/ttfonts. You also need to open /pdf-bridge/lib/vendor/mpdf/mpdf/src/Config/ConfigVariables.php file and change:
    a) ‘autoScriptToLang’ => false to true on line 96
    b) ‘autoLangToFont’ => false to true on line 101

Printing the Final Screen in WatuPRO

When you have the bridge installed and activated you can allow quiz takers to print the final screen of their quizzes. This can be configured with the following option on the Edit Quiz page -> Quiz Output tab:

Older PDF Bridge

The PDF Bridge version 0.2 uses the html2fpdf library and is much smaller – only 121 KB.

Note that it has some limitations:

  • Currently it does not support non-English characters
  • It won’t render well certificates with complicated design.

Download OLD PDF-Bridge Here (121 KB)

Request Email and Name to Submit a Quiz (WatuPRO)

Note: while this still works, it’s no longer cool. Check the new options instead.

When you select “Send email to the user with their results” in the quiz settings, an auto-generated field for collecting email appears on top of the quiz. (This is for non-logged in users – when user is logged in, this field does not appear).

Now, from version 4.1.1.5 we have a more elegant solution. You can add “name” and “email” fields yourself in the quiz description area. And more, if you use these fields with combination with the {{{button}}} tag, the user will have to fill them even before starting the quiz.

Here is how to use them:

In the exam description field simply enter any of the following two codes at the places where you want the fields to appear:
{{{name-field}}}
{{{email-field}}}
You can of course use only one of the fields if you wish. You can add any content around them, for example:
Your name: {{{name-field}}} (please enter your full name)
You can use the fields with or without a start button (the {{{button}}} tag), that’s up to you.
By default these fields are required and the user cannot submit the exam (when no “start” button is used) or reveal the exam contents (when “start” button is used) without filling the fields.
However you can make any of these fields optional if you add class “optional” to them. Like this:
Your name: {{{name-field class=”optional”}}} (so this is optional and won’t display an alert if left empty)
Your email (required): {{{email-field}}} (and this remains required)
You can also pass any HTML attributes if you want to style the fields beyond the default style. For example
{{{email-field size=”100″ onclick=”someJavascriptFunction();”}}} 
and so on.

In Certificates:

From version 4.1.4.6 exactly the same codes can be used to display the entered information in certificates. What if you use the same certificates for quizzes that use these codes and for quizzes that don’t use them? Don’t worry. The code {{{name-field}}} will then default to the behavior of the %%USER-NAME%% variable, and the {{{email-field}}} will be populated with the email from the user’s profile.

In the Final Screen / Email Contents

To display the user name there please use the %%USER-NAME%% variable.

WatuPRO to Arigato PRO Bridge

Do you want the users who take your WatuPRO quizzes to get signed up to a mailing list or an auto-responder marketing campaign?
This is now easy with the new bridge that connects WatuPRO to Arigato PRO (a.k.a. BroadFast PRO). It will let you specify a relation between quizzes and mailing lists so when someone completes a specified quiz, they are automatically subscribed in the corresponding mailing list. The plugin will work even for non-logged in users as long as email is provided (which will be if you select “Email user their results” in the quiz settings).

From version 0.9 (updated in January 2020) you can also specify desired grade and thus have users achieving different grades be subscribed in different mailing lists.

The bridge is absolutely free and can be downloaded here.

Install and activate it. Then under your WatuPRO menu you’ll see a new page called “Bridge to Arigato PRO”. Download and enjoy it.

wbbridge