You are here

function _pdf_export_prepend_basic_auth_callback in PDF Export 7

Regex replace callback in order to set the correct url for images.

1 string reference to '_pdf_export_prepend_basic_auth_callback'
pdf_export_render in ./pdf_export.module
Handle the html as PDF.

File

./pdf_export.module, line 214
PDF Export module.

Code

function _pdf_export_prepend_basic_auth_callback($matches) {
  $site_domain = variable_get('pdf_export_site_domain', NULL);
  $new_path = array(
    $matches[1],
    'site_url',
    $matches[4],
    $matches[5],
  );
  $new_path[1] = $site_domain;
  if (empty($site_domain)) {
    $new_path[1] = _pdf_export_generate_base_path(NULL);
  }
  return implode('', $new_path);
}