How to Customize the PDF Export Layout in TableCrafter

Updated July 2026 • 7 min read • By Fahad Murtaza

TableCrafter table builder, connect Gravity Forms, Google Sheets, Airtable, CSV, or JSON data sources
TableCrafter table builder, connect Gravity Forms, Google Sheets, Airtable, CSV, or JSON data sources

When your WordPress table data needs to become a shareable PDF, understanding how TableCrafter's print-to-PDF mechanism works is the first step. TableCrafter does not include a server-side PDF rendering engine or a PDF configuration panel in the table admin. The PDF export path triggers the browser's native print dialog, which converts the table's current on-screen layout to a file using the browser's built-in Save as PDF option. This guide covers the browser-side controls available, how the automatic print header works, how to influence the print output using TableCrafter shortcode attributes, and practical patterns for common reporting scenarios. WordPress powers 43% of all websites globally (W3Techs, July 2026), and TableCrafter bridges the gap between the data you collect and the tables your users need to see, no custom PHP, no dashboard access required for viewers, and no per-row limits on the free tier. The free version on WordPress.org supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV/PDF, role-based column visibility, and auto-refresh.

How Does Accessing the PDF Export Settings Work?

TableCrafter does not provide a dedicated PDF layout configuration panel in the table admin. The PDF export is handled client-side: clicking the PDF button in the export toolbar triggers toolbarDownloadPDF(), which routes through the Print button's click handler to run a print preparation sequence before calling window.print(). The browser's print dialog then handles orientation, scaling, margins, and file creation.

The shortcode attributes that affect the print output are show_print and print_all_rows. Setting show_print="false" removes the dedicated Print button from the toolbar, but the PDF option in the export menu still triggers window.print() as a fallback. Setting print_all_rows="false" skips the AJAX prefetch and prints only the currently visible page of rows rather than loading the full dataset.

To check the print output before sharing, load the table page, apply any filters you want reflected in the export, and click the PDF button. The browser opens a print preview panel showing the rendered output, including the automatic print header, before you commit to saving the file. This preview is the most accurate representation of what the final PDF will look like.

What Is Page Orientation: Portrait vs Landscape?

TableCrafter does not have a page orientation setting in the table admin. Page orientation for the PDF output is set in the browser's print dialog, not through a plugin option.

When the browser print dialog opens, look for the Orientation or Layout control. In Chrome and Edge, a Portrait or Landscape selector appears in the print settings panel on the left side. In Firefox, it is available under More settings. In Safari, click Show Details in the print dialog to access layout options.

As a practical guide, tables with five or fewer columns typically fit cleanly in portrait orientation. Tables with six or more columns, or columns that contain long values such as addresses or notes, usually benefit from landscape orientation where the wider page prevents column truncation. Check the print preview before saving so you can switch orientation without generating multiple files. The browser sends the selected orientation to its print renderer, which lays out the table within those page dimensions using the page's CSS styles.

If your table has columns being truncated in portrait, switch to landscape in the browser print dialog before trying to hide columns. Landscape often resolves readability issues without removing any data from the output.

How Do I Add a Logo to the PDF Header?

TableCrafter does not have a built-in logo upload setting for PDF exports. The plugin's automatic print header element (.gt-print-header) shows the WordPress page title, an export timestamp, and a filter summary. There is no plugin-provided mechanism to inject a custom logo image into that header area.

To add a company logo to the printed output, add CSS rules targeting @media print in your WordPress theme or in a custom CSS block on the page. A reliable pattern places a logo image in the .gt-print-header area using the CSS content: url(...) property on a pseudo-element, or adds a visible page element styled with display: none normally and display: block inside @media print.

If your WordPress theme already includes a print stylesheet, it may provide a global mechanism for injecting the site logo into print output. Check your theme's documentation or look for a print.css file. For a page-specific implementation, a Custom CSS block scoped to that page with @media print rules works without affecting the rest of the site.

Use PNG format for any logo you inject via CSS. PNG with a transparent background renders cleanly against the white print background, while JPEG may show a white or colored fill in areas intended to be transparent.

What Is Header Text: Title and Subtitle?

TableCrafter does not have a header text input field or token system for PDF exports. The print header is generated automatically by preparePrintHeader(), which runs every time the Print button is clicked, filling in live values at that moment.

The automatic print header uses the .gt-print-header container, which holds two dynamic elements. The .gt-print-header__date element receives a human-readable date and time string formatted using the browser's locale (for example, "July 6, 2026 at 2:30 PM"). The .gt-print-header__filters element receives a plain-text summary of every active filter, for example "Status = Active · Date July 1 to July 6 · Search = invoice." If no filters are active, it shows "No filters applied."

The title in the print header comes from the WordPress page's title via get_the_title(), not the TableCrafter table name. If the page hosting the table is titled "Load Report," that text appears as the document heading in the print output.

To display different header text, use CSS @media print rules to hide the .gt-print-header__title element and inject your own content via a pseudo-element or a separate page element that is shown only when printing.

TableCrafter does not provide a footer text field or a page-number toggle for PDF exports. The footer area of the printed PDF is controlled by the browser's print settings, not by the plugin.

Most desktop browsers add a default footer to printed pages that includes the page URL on the left and "Page X of Y" on the right. These can be removed or customized in the browser's print dialog. Chrome and Edge include footer controls under More settings in the print panel, where each footer area can be set to a custom text string or disabled entirely. Firefox provides similar controls via Page Setup. Safari's print dialog offers limited footer customization through Show Details.

For a consistent footer across all visitors regardless of their browser settings, CSS @media print is the reliable path. The @page CSS rule supports named margin boxes including @bottom-left, @bottom-center, and @bottom-right, where you can inject static text via the content property. Browser support for named margin boxes varies, so test across your target browsers before deploying this approach in a production environment.

How Does Excluding Columns from the PDF Work?

TableCrafter does not have a PDF-specific column exclusion list. Because the PDF export uses the browser's print dialog rather than a server-side renderer, the printed output reflects the table exactly as it appears in the browser when the print dialog opens.

To exclude a column from the PDF output, hide it before triggering the export. Two approaches work reliably. First, for columns that should always be absent from print output (action buttons, raw ID columns, internal notes), add a CSS rule targeting @media print that sets display: none on that column's cells using the column's data-field-id attribute selector. This applies automatically on every print without any visitor interaction. Second, for visitor-controlled exclusions, enable the column visibility picker so visitors can toggle off columns they don't want, then click the PDF button. Columns toggled off via the picker have display:none applied to their cells, so the browser excludes them from the printed layout.

For admin-level reporting workflows where the same table serves multiple audiences, consider creating a separate table with a narrower column configuration for report exports rather than relying on runtime column toggling.

How Does Column Width Distribution in PDF Work?

TableCrafter does not have a PDF-specific column width configuration. Column widths in the print output are determined by the browser's CSS rendering of the table, using the same column width rules that apply on screen. By default, the table uses automatic widths, which the browser distributes based on cell content. In a wide table, columns with long values get more space and columns with short values get proportionally less.

To influence column widths specifically for the print output, use CSS @media print rules. Target individual columns by their data-field-id attribute and assign a percentage width. For example, setting a notes column to 35% and the remaining columns to share the other 65% gives explicit control over the printed proportions without affecting the on-screen layout.

Switching to landscape orientation in the browser's print dialog is the simplest first step when columns appear cramped. Landscape gives every column more horizontal room without requiring any CSS changes. Try landscape before writing width overrides, since it often resolves truncation issues for tables with six to eight columns without removing any data.

How Does Use Cases for Custom PDF Layout Work?

Client Reports

Apply filters to scope the data to the relevant client or date range before clicking PDF. The automatic print header captures the active filter summary, so recipients see at a glance what criteria produced the report. Use landscape orientation in the browser print dialog for wide tables. Add a logo via CSS @media print targeting .gt-print-header for branded output.

Invoice Summaries

Filter the table to the specific records before exporting. The print header stamps the export date and filter state automatically. Portrait orientation works well for narrow datasets such as line-item invoices. To suppress internal ID or action columns from print, add @media print { td[data-field-id="your_field"] { display: none } } to your theme's print CSS.

Compliance Documents

Use print_all_rows="true" (the default) to ensure the print output includes all entries up to 5000 rows. The print header records the exact export timestamp, providing a verifiable point-in-time snapshot. For tables with many columns, select landscape orientation in the browser print settings to avoid truncation.

Printed Checklists

Hide irrelevant columns using the column visibility picker before clicking PDF. Columns toggled off via the picker have display:none on their cells and will not appear in the print layout. Set show_print="true" in the shortcode to ensure the dedicated Print button is visible in the toolbar alongside the export menu.

How Does Testing the PDF Output Work?

Always preview the print output before distributing a PDF to clients or stakeholders. The browser print preview is the most accurate representation of what the saved file will look like.

  1. Load the table page and apply any filters you want reflected in the export.
  2. Click Export and select PDF. For large tables, wait for the print preparation to complete: when print_all_rows is enabled, TableCrafter fetches all rows via AJAX before the print dialog opens.
  3. In the print preview, check: the print header content (page title, timestamp, filter summary), column count, that no columns appear truncated, and that the page orientation matches your needs.
  4. If the table spans multiple print pages, scroll to page 2 in the preview to confirm the data continues correctly and the browser footer shows page numbers.
PDF generation happens entirely in the browser, not on the server. There are no PHP execution time limits from the plugin side. For very large datasets, the delay before the print dialog opens comes from the AJAX row fetch. Set print_all_rows="false" to skip the prefetch and print only the current visible page if you need the dialog to open immediately.

What Are the Next Steps?

With the browser print-to-PDF mechanism understood, you can apply it to specific reporting scenarios. The most common next step is combining PDF export with filtered views: apply the filters that scope the data to a specific client, date range, or status, then click the PDF button. The print header captures that filter state automatically, so each file is self-documenting without any extra setup.

For teams where multiple users export from the same table, the column visibility picker and the show_print shortcode attribute work together to control what appears in the output. Role-based column visibility in Pro ensures that a restricted user exporting the table sees only their permitted columns in the print layout, while an admin sees the full column set.

For CSS-based print customization, keep all @media print rules in a single location (your theme's print stylesheet or a Custom CSS block on the page) so they are easy to maintain. Test across Chrome, Firefox, and Safari since browser print rendering differences are more pronounced than on-screen rendering differences. Related guides covering CSV export formatting and role-based export access follow in this series.

Frequently Asked Questions

How Does Accessing the PDF Export Settings Work?

TableCrafter does not have a PDF layout options panel in the table admin. PDF export works through the browser's print dialog: clicking the PDF button triggers toolbarDownloadPDF(), which loads all rows via AJAX (when print_all_rows is enabled) then calls window.print(). The relevant plugin-side settings are the shortcode attributes show_print and print_all_rows.

What Is TableCrafter?

TableCrafter is a WordPress plugin that turns data from Gravity Forms, Google Sheets, Airtable, Notion, REST APIs, CSV files, and WooCommerce into interactive, sortable, filterable frontend tables. Embed any table on any WordPress page with the [tablecrafter] shortcode or the native Gutenberg block. No PHP or custom development required. The free version supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV and PDF, role-based column visibility, and auto-refresh.

Does this require PHP or developer skills?

No. TableCrafter is configured entirely through the WordPress admin interface. You choose your data source, map fields to columns, and set display preferences using point-and-click controls. Embedding uses the [tablecrafter] shortcode or the native Gutenberg block.

Is the free version sufficient or do I need Pro?

The free plugin on WordPress.org supports CSV, JSON, Google Sheets, and Excel sources with unlimited tables, rows, and columns. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST API sources, inline cell editing, bulk row actions, export to CSV and PDF, role-based column visibility, and auto-refresh every N seconds.

Ready to try it?

TableCrafter is free on WordPress.org. Pro unlocks inline editing, role-based permissions, and advanced data sources.

If the result does not match expectations after saving, use the TableCrafter debug log (enable via TableCrafter Settings > Advanced > Debug Mode) to trace exactly which configuration value is being applied for the current request.

After completing this step, verify the result by viewing the page as a logged-out visitor in an incognito window. This confirms the table behaves correctly for public visitors rather than reflecting admin-level permissions that may hide configuration issues during initial setup. Check both the rendered output and the browser console for any JavaScript errors.