You are here

function pdf_field_formatter_settings_summary in PDF 7

Implements hook_field_formatter_settings_summary().

File

includes/pdf.field.inc, line 105

Code

function pdf_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  if ($display['type'] == 'pdf_default') {
    return t('Use pdf.js even users have PDF reader plugin: @keep_pdfjs', array(
      '@keep_pdfjs' => $settings['keep_pdfjs'] ? t('Yes') : t('No'),
    )) . '<br />' . t('Width: @width , Height: @height', array(
      '@width' => $settings['width'],
      '@height' => $settings['height'],
    ));
  }
  if ($display['type'] == 'pdf_thumbnail') {
    return t('Scale: @scale', array(
      '@scale' => $settings['scale'],
    )) . '<br />' . t('Widht: @width , Height: @height', array(
      '@width' => $settings['width'],
      '@height' => $settings['height'],
    ));
  }
  if ($display['type'] == 'pdf_pages') {
    return t('Scale: @scale', array(
      '@scale' => $settings['scale'],
    ));
  }
  return '';
}