WPCasa Listing PDF

If you activate the WPCasa Listing PDF add-on the regular Print link on single property pages that redirects the user to a print-friendly version of the listing will be replaced with a View PDF link. When the user clicks the new link a PDF sheet of the listing will be created on the fly.

wpcasa-listing-pdf

Also see the add-on page in our shop or the demo for a live example.

Install Add-On

Please keep in mind that this plugin is an add-on for WPCasa. That means that you need to install the WPCasa core plugin first.

Once WPCasa is up and running you can install our WPCasa Listing PDF add-on. Please go to WP-Admin > Plugins > Add New > Upload Plugin and browse to the plugin file on your local computer. If you purchased a license, you can download it from your account on the WPCasa website. Click Install Now once you’ve uploaded the plugin and activate it.

Please notice! Due to the dompdf library this add-on is quite heavy. Please be patient while uploading it to your site.

Create a PDF

On the listing page of any of your listings you will now find a new link with the text View PDF. Click that link to generate the PDF flyer of the corresponding listing.

wpcasa-listing-pdf-example

Add-On Settings

The listing PDF add-on also comes with a set of configuration options that you can access on WP-Admin > WPCasa > Settings > [tab] PDF.

Link Label
This is the text of the link that is displayed to create the PDF page.

Link Target
You can set the link target and choose to open the PDF in a new tab or window.

Layout
Further you can make your choice between (by default) three different PDF layouts. Just try them out to see which one you like most.

Page Numbers
Page number can be displayed in the footer section of each page of the PDF document in the format [current]/[total].

Unbranded
You can allow your visitors to download an unbranded version of the PDF. See more information below.

wpcasa-listing-pdf-settings

PDF Templates

The output of the listing PDF add-on is based on template files that you can change to your needs if necessary. The templates are located in the /templates folder of the add-on. Please also have a look at Using Templates to better understand how to use templates in WPCasa.

wpcasa-listing-pdf-templates

Unbranded PDFs

As seen above you can allow your website visitors to download unbranded versions of the listing PDF. This is especially useful for other agents who want to offer a property to their clients without confusing them with another logo or a different agent displayed on the flyer.

When you activate this option in the add-on settings, you can offer a different listing URL to these agents. Let’s say the regular URL of a listing is:

http://domain.com/listing/my-example-listing

The PDF URL would be the following (see demo PDF):

http://domain.com/listing/my-example-listing/?print=123

An unbranded PDF can be displayed by adding &unbranded=1 to the URL (see demo PDF).

http://domain.com/listing/my-example-listing/?print=123&unbranded=1

With this option the PDF header (with site title, logo etc.) and the section with the listing agent information will be hidden.

Filter Hooks

For further customization the add-on also includes a few WordPress filter hooks. These might be useful if you are a developer and want to control a few things programatically and not through template files directly.

PDF Elements

The elements of the PDF are managed in a central array to define, whether or not to display an element, the title of the section in the PDF or to add a page break before the corresponding element.

Please check the default elements array above and use the wpsight_listing_pdf_elements filter to change it to your needs. A possible example is adding a title and a page break for the description section by using the following code:

PDF Layouts

Similar to the elements we have another array of all the main layout files. Using the wpsight_listing_pdf_layouts you can add any other template file.

The default layouts registered with the add-on let WPCasa know where to search for the following template files:

Key Template
layout-1 listing-pdf-layout-1.php
layout-2 listing-pdf-layout-2.php
layout-3 listing-pdf-layout-3.php

In the following example we will register a new layout called layout-custom:

Now we need to create the new template file listing-pdf-layout-custom.php and place it in one of the possible template folders (please also see Using Templates).

Action Hooks

PDF Head

By default the wpsight_head_pdf action hook is used to add the default CSS file to the HEAD section of the HTML template of the PDF. Here you can add your own styles or other scripts you may need.

PDF Footer

The wpsight_listing_pdf_footer hook is fired at the very bottom of the footer area of the PDF.

PDF Before / After

The hooks wpsight_listing_pdf_before and wpsight_listing_pdf_after are called before and after all the listing PDF elements but inside the main wrap. The following example shows how to display some custom content at the very top before the header.

PDF [Element] Before / After

Here is a list of additional action hooks to display custom content before or after a specific PDF element.

Element Action Hook
Header wpsight_listing_pdf_header_before
Header wpsight_listing_pdf_header_after
Title wpsight_listing_pdf_title_before
Title wpsight_listing_pdf_title_after
Info wpsight_listing_pdf_info_before
Info wpsight_listing_pdf_info_after
Image wpsight_listing_pdf_image_before
Image wpsight_listing_pdf_image_after
Description wpsight_listing_pdf_description_before
Description wpsight_listing_pdf_description_after
Features wpsight_listing_pdf_features_before
Features wpsight_listing_pdf_features_after
Gallery wpsight_listing_pdf_gallery_before
Gallery wpsight_listing_pdf_gallery_after
Location wpsight_listing_pdf_location_before
Location wpsight_listing_pdf_location_after
Agent wpsight_listing_pdf_agent_before
Agent wpsight_listing_pdf_agent_after
QR wpsight_listing_pdf_qr_before
QR wpsight_listing_pdf_qr_after

Useful Links

Was this article helpful? Yes · No