Documentation · Frontend Guide

PDF Datasheet

This document covers the PDF datasheet (vehicle exposé) feature of the ADP Car Market Hub WordPress Plugin: how visitors access it, what it contains, and how it is configured.

When to use this document

Read this document if you are enabling the PDF datasheet feature for the first time, configuring its branding and content, or troubleshooting issues with the download link or rendered output.

Overview

The PDF datasheet feature provides a print-optimized vehicle summary page that visitors can open in their browser and save or print as a PDF using the browser's built-in print dialog. It is not a server-generated PDF file; instead, it is a standalone HTML page rendered by the plugin specifically for printing.

When a visitor clicks the "Download PDF" button on a vehicle detail page, the browser navigates to a special URL. The plugin intercepts the request, renders a full standalone HTML page (without the WordPress theme header and footer), and exits. The visitor can then use the browser's File → Print → Save as PDF function to save the document.

Requirements or prerequisites

  • The PDF datasheet feature must be enabled in the plugin settings (FEATURE_PDF_DATASHEET). It is enabled by default.
  • The vehicle must be published. Drafts and private posts return a 404 error from the datasheet endpoint.
  • Pretty permalinks must be enabled in WordPress for the query variable used by the datasheet URL to be processed correctly.

Step-by-step instructions

Enable the PDF datasheet feature

  1. In the WordPress admin, open the plugin settings.
  2. Locate the PDF Datasheet feature toggle and confirm it is enabled.
  3. Navigate to the PDF Manager section to configure branding and content fields.
  4. Save the settings.

The "Download PDF" button will appear on all published vehicle detail pages.

Access the PDF datasheet as a visitor

  1. Open a vehicle detail page.
  2. Click the Download PDF or exposé button.
  3. The browser navigates to the datasheet page. This page has no site header or footer — it is styled specifically for printing.
  4. Use the browser's print function (Ctrl+P or Cmd+P, or File → Print) and choose Save as PDF as the destination.
  5. Adjust print settings if needed (paper size, margins) and save the file.

Access the datasheet URL directly

The datasheet is available at:

https://yoursite.com/?as24ci_pdf={post_id}

where {post_id} is the numeric WordPress post ID of the vehicle. This URL is accessible to any visitor without authentication, as long as the vehicle is published.

Configuration reference

Feature toggle

SettingOption keyDefaultDescription
Enable PDF datasheetas24ci_feature_pdf_datasheetOn (1)Shows or hides the "Download PDF" button on vehicle detail pages

PDF Manager settings

The PDF Manager controls the branding, layout, and content of the rendered datasheet. Settings are stored as a single serialized array option (as24ci_pdf_manager_settings).

Branding:

SettingDefaultDescription
LogoNoneUpload a logo image to appear in the header
Show companyOnInclude the seller company name
Show addressOnInclude the seller address
Show phoneOnInclude the seller phone number
Show emailOnInclude the seller email address
Show websiteOffInclude the seller website URL
Primary color#0073aaMain color used for headings and accents
Accent color#1a1a1aSecondary color

Layout:

SettingDefaultDescription
Paper formatA4Paper size for print layout
Number of images1How many vehicle images to include in the datasheet
Show galleryOnWhether to show the image gallery section
Show price boxOnWhether to show the price box
Show contactOnWhether to show the seller contact information section

QR code:

SettingDefaultDescription
Show QROffInclude a QR code linking back to the vehicle detail page on the website

The QR code is generated using a public third-party service (api.qrserver.com). This service is called at the time the datasheet page is loaded. If your privacy policy does not permit external service calls for visitors, this option should remain disabled, or the QR image URL can be replaced via the as24ci_pdf_qr_image_url filter.

Content fields:

The following fields can be individually enabled or disabled in the PDF Manager:

Field keyLabel
titleVehicle title
pricePrice
mileageMileage
first_regFirst registration
fuel_typeFuel type
transmissionTransmission
powerPower
body_typeBody type
exterior_colorExterior color
doorsDoors
seatsSeats
emission_classEmission class
co2CO₂ values
consumptionEnergy consumption
equipmentEquipment list
descriptionVehicle description
locationLocation
contactContact information

All fields are enabled by default. Disabling a field removes it from the rendered datasheet for all vehicles.

Legal notice:

A custom legal notice text can be added. This text appears in the footer of the datasheet. Use this field for required legal disclaimers, price footnotes, or terms of use.

Operational notes

  • The datasheet endpoint is triggered by the as24ci_pdf query variable. The plugin registers this variable with WordPress via the query_vars filter and intercepts the request in template_redirect.
  • The rendered page is a complete standalone HTML document. It does not use wp_head() or wp_footer(). All styles are inlined within the page.
  • The seller information shown on the datasheet is read from the post author's user meta fields (as24ci_seller_display_name, as24ci_seller_email, as24ci_seller_phone, as24ci_seller_address). If these fields are empty, the WordPress user's display name and email are used as fallback.
  • Visiting the datasheet URL with an invalid post ID returns an HTTP 400 error. Visiting with a valid ID for an unpublished vehicle returns an HTTP 404 error.
  • Page caching plugins may cache the datasheet URL. To prevent this, configure your caching plugin to exclude URLs containing the as24ci_pdf query parameter.

Troubleshooting

The "Download PDF" button does not appear on vehicle pages.

  • Confirm the PDF datasheet feature is enabled in the plugin settings.
  • Check the Layout Manager to ensure the PDF download element is active for the single vehicle page zone.

The datasheet URL returns a 404 error.

  • Verify the vehicle is published. Drafts, private posts, and deleted vehicles return 404.
  • Check that the post type matches the plugin's custom post type (as24ci_car).

The datasheet URL returns a 400 error.

  • The post ID in the URL is invalid or zero. Verify the URL is being generated correctly.

The datasheet renders without a logo or branding.

  • In the PDF Manager, confirm a logo image has been selected and saved.
  • If the logo is not appearing, verify the attachment ID stored in the PDF Manager settings points to a valid uploaded image.

The QR code does not appear on the datasheet.

  • Confirm the QR code option is enabled in the PDF Manager.
  • The QR service (api.qrserver.com) is called when the page loads. If your hosting blocks outbound HTTP requests or the service is temporarily unavailable, the image may not load.
  • You can replace the QR image URL using the as24ci_pdf_qr_image_url filter. Return an empty string from the filter to suppress the QR code entirely.

The datasheet is being cached incorrectly by a caching plugin.

  • Add the as24ci_pdf query parameter to your caching plugin's list of excluded URLs or parameters.