Hello!

My problem was that the PDF document from a node was empty.
I use the integration between Print module (v:7.x-2.0) and Service Links (v:7.x-2.3).
I also use Display Suite, custom page.tpl for content types and Path auto.

I could resolve this using node-id tag instead query in the print_services.module.

Line 27

if (module_exists('print_pdf')) {
    $links['printpdf'] = array(
      'name' => 'Print PDF',
      'link' => '<front-page>printpdf/<node-id>',
      'description' => t('PDF version'),
    );
  }

If you could change that, I would tank you a lot!! :)

Alek

Comments

alek123 created an issue. See original summary.

alek123’s picture

Issue summary: View changes
alek123’s picture

Status: Active » Postponed

I still have the error... I will look better why I have this problem.

Alek

alek123’s picture

Status: Postponed » Closed (works as designed)

I found the problem!!

In my theme template.php has a preprocess_page hook function with:

  if (isset($vars['node'])) {
    $vars['theme_hook_suggestion'] = 'page__'.$vars['node']->type;
  }

I added

  if (isset($vars['node'])) {
    $vars['theme_hook_suggestion'] = 'page__'.$vars['node']->type;
  }
  if (in_array(strtolower(arg(0)), array('print', 'printpdf', 'printmail'))) {
    $vars['theme_hook_suggestion'] = 'print';
  }

To take the correct tpl because in the ordinary page.tpl the content was render($page['content']) and the print module save the content in $content.

Alek