Blank page on PDF Creation

Created on 6 July 2021, over 3 years ago
Updated 17 February 2023, almost 2 years ago

Drupal version: 7.78
Views PDF version: 7.x-3.1
TCPDF version: 6.4.1
FPDI version: 1.62
Views version: 7.x-3.24
Token version: 7.x-1.8
Libraries: 7.x-2.5
jQuery Update: 1.10.2

Problem/Motivation

I am trying to use this to archive all pages of a D7 site, but I can only seem to get a blank PDF file.

Steps to reproduce

  1. create view and save (see view export below)
  2. go to path defined in view (https://MYSITE/printpdf
  3. PDF is created, but page is totally blank.

Any help to point out how to get this to work is appreciated.

$view = new view();
$view->name = 'printpages';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'printpages';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'printpages';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
  'views_bulk_operations' => 'views_bulk_operations',
  'field_subject_ec' => 'field_subject_ec',
  'field_from_ec' => 'field_from_ec',
  'field_received_ec' => 'field_received_ec',
  'body' => 'body',
);
$handler->display->display_options['style_options']['class'] = '';
$handler->display->display_options['style_options']['default'] = 'field_received_ec';
$handler->display->display_options['style_options']['info'] = array(
  'views_bulk_operations' => array(
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'field_subject_ec' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'field_from_ec' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'field_received_ec' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
  'body' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
    'empty_column' => 0,
  ),
);
/* Field: Content: Subject */
$handler->display->display_options['fields']['field_subject_ab']['id'] = 'field_subject_ab';
$handler->display->display_options['fields']['field_subject_ab']['table'] = 'field_data_field_subject_ab';
$handler->display->display_options['fields']['field_subject_ab']['field'] = 'field_subject_ab';
$handler->display->display_options['fields']['field_subject_ab']['empty'] = 'THIS IS EMPTY!';
$handler->display->display_options['fields']['field_subject_ab']['hide_alter_empty'] = FALSE;
/* Field: Content: Body */
$handler->display->display_options['fields']['body']['id'] = 'body';
$handler->display->display_options['fields']['body']['table'] = 'field_data_body';
$handler->display->display_options['fields']['body']['field'] = 'body';
$handler->display->display_options['fields']['body']['type'] = 'text_trimmed';
$handler->display->display_options['fields']['body']['settings'] = array(
  'trim_length' => '600',
);
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
/* Filter criterion: Content: Published status */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'pf_executive_council' => 'pf_executive_council',
);
$handler->display->display_options['filters']['type']['exposed'] = TRUE;
$handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
$handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
$handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
$handler->display->display_options['filters']['type']['expose']['remember'] = TRUE;
$handler->display->display_options['filters']['type']['expose']['multiple'] = TRUE;
$handler->display->display_options['filters']['type']['expose']['remember_roles'] = array(
  2 => '2',
);
/* Filter criterion: Content: Nid */
$handler->display->display_options['filters']['nid']['id'] = 'nid';
$handler->display->display_options['filters']['nid']['table'] = 'node';
$handler->display->display_options['filters']['nid']['field'] = 'nid';
$handler->display->display_options['filters']['nid']['operator'] = 'between';
$handler->display->display_options['filters']['nid']['value']['min'] = '3600';
$handler->display->display_options['filters']['nid']['value']['max'] = '3650';
$handler->display->display_options['filters']['nid']['value']['value'] = '3625';
$handler->display->display_options['filters']['nid']['expose']['operator_id'] = 'nid_op';
$handler->display->display_options['filters']['nid']['expose']['label'] = 'Nid';
$handler->display->display_options['filters']['nid']['expose']['operator'] = 'nid_op';
$handler->display->display_options['filters']['nid']['expose']['identifier'] = 'nid';
$handler->display->display_options['filters']['nid']['expose']['remember_roles'] = array(
  2 => '2',
);

/* Display: PDF Page */
$handler = $view->new_display('pdf', 'PDF Page', 'pdf_1');
$handler->display->display_options['style_plugin'] = 'pdf_unformatted';
$handler->display->display_options['row_plugin'] = 'pdf_fields';
$handler->display->display_options['row_options']['formats'] = array(
  'field_subject_ab' => array(
    'position' => array(
      'object' => 'last_position',
      'corner' => 'top_left',
      'x' => '0',
      'y' => '0',
      'width' => '100',
      'height' => '150',
    ),
    'text' => array(
      'font_size' => '12',
      'font_family' => 'default',
      'font_style' => NULL,
      'align' => NULL,
      'hyphenate' => NULL,
      'color' => '000000',
    ),
    'render' => array(
      'is_html' => 1,
      'minimal_space' => '1',
      'custom_layout' => 0,
      'custom_post' => 0,
      'use_php' => 0,
      'eval_before' => '',
      'bypass_eval_before' => FALSE,
      'eval_after' => '',
      'bypass_eval_after' => FALSE,
    ),
  ),
  'body' => array(
    'position' => array(
      'object' => 'last_position',
      'corner' => 'top_left',
      'x' => '0',
      'y' => '0',
      'width' => '100',
      'height' => '150',
    ),
    'text' => array(
      'font_size' => '12',
      'font_family' => 'default',
      'font_style' => NULL,
      'align' => NULL,
      'hyphenate' => NULL,
      'color' => '000000',
    ),
    'render' => array(
      'is_html' => 1,
      'minimal_space' => '1',
      'custom_layout' => 0,
      'custom_post' => 0,
      'use_php' => 0,
      'eval_before' => '',
      'bypass_eval_before' => FALSE,
      'eval_after' => '',
      'bypass_eval_after' => FALSE,
    ),
  ),
);
$handler->display->display_options['path'] = 'printpdf';
$handler->display->display_options['displays'] = array(
  'page' => 'page',
  'default' => 0,
);
$handler->display->display_options['default_page_format'] = 'LETTER';
$handler->display->display_options['default_font_family'] = 'freesans';
$handler->display->display_options['default_font_style'] = array(
  'b' => 0,
  'i' => 0,
  'u' => 0,
  'd' => 0,
  'o' => 0,
);
$handler->display->display_options['default_font_size'] = '12';
πŸ’¬ Support request
Status

Closed: cannot reproduce

Version

3.1

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States kwfinken Lansing, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024