Documentation · Troubleshooting

PDF Datasheet Issues

This document covers problems with the print-optimized vehicle datasheet feature of the ADP Car Market Hub plugin, including access, rendering, missing data, images, settings and QR code generation.

When to use this document

Read this document when:

  • The datasheet URL (?as24ci_pdf={post_id}) returns a 404 or a blank page.
  • The datasheet page opens but some fields, images, or sections are missing.
  • The "Print Datasheet" button or link does not appear on vehicle detail pages.
  • PDF Manager settings are not being applied to the rendered datasheet.
  • The QR code is missing or shows an error image.

Overview

The PDF Datasheet feature renders a standalone, print-optimized HTML page for each vehicle. The page is not a true PDF file — it is an HTML document styled with print CSS that the visitor (or browser automation) converts to PDF using the browser's Print → Save as PDF function. No PHP PDF library is required.

The datasheet is accessed via a query variable appended to the site home URL:

https://your-site.com/?as24ci_pdf={post_id}

Where {post_id} is the numeric WordPress post ID of the vehicle. The page is only rendered for published as24ci_car posts. Drafts, trashed posts, or posts of any other type return a 404 error.

The feature is disabled by default. It must be explicitly enabled in the plugin settings before it will respond to any request.

Requirements

  • The plugin must be active.
  • The PDF Datasheet feature toggle must be enabled in the plugin settings (the master toggle lives on the Design & Styles tab; template-level configuration is on the PDF Manager tab).
  • WordPress permalinks must be functional (plain or pretty).
  • The vehicle post must be in publish status.
  • The visiting browser must support CSS print stylesheets to produce a well-formatted PDF when printing.

Diagnostic steps

Step 1: Confirm the feature is enabled

The PDF Datasheet feature is disabled by default on new installations.

  1. Go to the plugin admin and open the Features or Design & Styles settings.
  2. Look for the PDF Datasheet toggle.
  3. Enable it and save.
  4. After enabling, flush the WordPress permalink cache by going to Settings → Permalinks and clicking Save Changes.

Step 2: Verify the vehicle post ID and status

The URL format is ?as24ci_pdf={post_id}. If you use the wrong post ID, or the vehicle is not published, you will receive an error:

  • An invalid (non-numeric or negative) post ID returns HTTP 400 ("Invalid vehicle ID").
  • A post that does not exist, is not of type as24ci_car, or is not published returns HTTP 404 ("Vehicle not found or not published").

To find the correct post ID:

  1. Go to the vehicle's edit screen in the WordPress admin.
  2. The post ID appears in the URL: ?post=12345.
  3. Test the datasheet URL: https://your-site.com/?as24ci_pdf=12345.

Step 3: Check that the query variable is registered

The datasheet uses the WordPress query variable as24ci_pdf. If another plugin or theme unregisters or conflicts with custom query vars, the datasheet may not trigger.

  1. After enabling the feature, flush permalinks (Settings → Permalinks → Save Changes).
  2. If the URL still does not work, check whether a security or caching plugin is stripping unknown query parameters from requests.

Step 4: Diagnose missing fields or sections

The PDF Manager settings (stored in the option as24ci_pdf_manager_settings) control which fields and sections appear on the datasheet. If fields are missing:

  1. Go to the PDF Manager admin tab.
  2. Review the Content fields checkboxes. Any field that is unchecked will not appear on the datasheet.
  3. Review the Layout section for toggles such as Show Gallery, Show Price Box, and Show Contact Information.
  4. Save the settings and reload the datasheet.

If a field is enabled in PDF Manager but still does not appear, the vehicle may not have data for that field. For example, if the vehicle was imported without a price, the price field will not render even when enabled.

Step 5: Diagnose missing images

The datasheet uses images from two meta fields:

  • _as24ci_image_ids — images imported from the API.
  • _as24ci_manual_image_ids — manually uploaded images.

The datasheet displays a maximum of 5 images regardless of the Image Count setting in PDF Manager. If images are missing:

  1. Confirm images were imported. Go to the vehicle's edit screen in WordPress and check the Media metabox or image gallery section.
  2. Confirm the Show Gallery toggle is enabled in the PDF Manager settings.
  3. If the vehicle has a featured image set but no imported images, the datasheet will use the featured image as a fallback.
  4. Check that the WordPress Media Library entries for the images are not deleted or corrupted.

Step 6: Check the QR code

The QR code is optional and is disabled by default. When enabled, the datasheet uses the public QR code API at https://api.qrserver.com/v1/create-qr-code/ to generate an image. This is an external service with no authentication requirement.

If the QR code is not appearing:

  1. Confirm the Show QR Code toggle is enabled in PDF Manager settings.
  2. Confirm the vehicle's published URL does not contain autoscout24. in the host — the plugin intentionally suppresses the QR code when the vehicle URL resolves to the AutoScout24 domain.
  3. Confirm the server has outbound internet access to api.qrserver.com on port 443. In restricted hosting environments, this request may be blocked.
  4. The QR code image URL can be replaced using the as24ci_pdf_qr_image_url filter. If a customization is suppressing the image (by returning an empty string), check your active theme and plugins for this filter.

Step 7: Check seller information

Seller contact information on the datasheet is read from the post author's user meta fields:

DataUser meta key
Display nameas24ci_seller_display_name (falls back to WordPress display_name)
Email addressas24ci_seller_email (falls back to WordPress user_email)
Phone numberas24ci_seller_phone
Addressas24ci_seller_address

If contact information is missing:

  1. Go to Users in the WordPress admin and open the post author's profile.
  2. Check whether the seller profile fields are populated.
  3. If the seller profile fields section is not visible, confirm the Seller_Profile_Fields class is active (controlled by plugin bootstrap).

Configuration reference — PDF Manager settings

The PDF Manager settings are stored in the as24ci_pdf_manager_settings option as a serialized array. They are managed in the PDF Manager admin tab.

Branding

SettingDefaultDescription
Logo(none)WordPress media library image ID to use as the dealership logo
Show company nameOnShow the seller's display name on the datasheet
Show addressOnShow the seller's address
Show phoneOnShow the seller's phone number
Show emailOnShow the seller's email address
Show websiteOffShow a website link
Primary color#0073aaAccent color for headings and price box
Accent color#1a1a1aColor for secondary text elements

Layout

SettingDefaultDescription
Paper formatA4Page size for printing. Supported: A4, Letter
Image count1Number of vehicle images to show (1–5; capped at 5 regardless of this value)
Show galleryOnInclude the image gallery section
Show price boxOnShow the highlighted price box
Show contactOnShow the contact / seller information block

QR code

SettingDefaultDescription
Show QR codeOffGenerate and display a QR code linking back to the vehicle page

Content fields

The following fields can be individually shown or hidden. All are enabled by default.

Field keyLabel
titleVehicle title (also controls Make and Model rows)
pricePrice
mileageMileage
first_regFirst registration
fuel_typeFuel type
transmissionTransmission
powerPower (HP and cubic capacity)
body_typeBody type
exterior_colorExterior color
doorsDoors
seatsSeats
emission_classEmission class
co2CO2 values
consumptionEnergy consumption
equipmentEquipment list (standard and optional)
descriptionVehicle description or excerpt
locationLocation
contactContact information

A freeform text field appended at the bottom of the datasheet. Accepts plain text. Useful for legal disclaimers or standard terms of sale.

Operational notes

  • The datasheet page is rendered as a standalone HTML document. It does not use the WordPress theme header or footer. Theme CSS, sidebars, and navigation elements do not apply.
  • Vehicle data is read from the custom {prefix}as24_vehicles database table with a fallback to WordPress post meta. If the custom table does not exist (for example on a corrupted or migrated install), some fields may fall back to post meta values.
  • The description field uses the post excerpt if one is set; otherwise it uses the first 150 words of the post content.
  • The datasheet URL uses a query variable (not a rewrite rule), so it works on both pretty permalinks and plain (?p=) permalink structures.
  • There is no authentication requirement to view the datasheet. Any visitor with the URL can access it for any published vehicle. If access restriction is required, it must be implemented at the hosting or CDN level.

Troubleshooting

SymptomLikely causeCheck
?as24ci_pdf=123 returns 404Feature not enabled, vehicle not published, or wrong post IDEnable feature; confirm vehicle status; verify post ID
Blank page or unstyled outputTheme or plugin conflict interfering with template_redirectTest with default theme and no other plugins active
All fields missing from datasheetPDF Manager has all fields uncheckedReview field checkboxes in PDF Manager settings
Images not showingGallery toggle off, or no images importedEnable Show Gallery; confirm images were imported
Seller contact info missingUser meta fields not populatedFill in seller profile fields on the user profile
QR code not showingFeature not enabled or outbound request blockedEnable QR toggle; check server outbound access to api.qrserver.com
Price shows as emptyVehicle has no price in _as24ci_price or the custom tableRe-import the vehicle or manually set the price
Layout looks wrong when printingBrowser print settings override the CSSUse Print Preview and check margins, scale, and print background settings