CMS  Version 3.9
PDF Class Reference

Public Member Functions

 PDF ($uri, $ssl=false, $useToken=true, $output=null, $landscape=false)
 Creates a new PDF object configured to generate a PDF from the supplied URI on the local web application. More...
 
 coverPage ($url)
 Provides a separate URL to use as the cover page of the PDF. More...
 
 footer ($text, $position="center", $size=11)
 
 generate ()
 

Public Attributes

 $uri
 
 $ssl
 
 $output
 
 $footer
 
 $landscape = false
 

Detailed Description

Definition at line 358 of file pdf.inc.

Member Function Documentation

◆ coverPage()

PDF::coverPage (   $url)

Provides a separate URL to use as the cover page of the PDF.

Parameters
string$urlthe URL used to generate the cover page
Returns
PDF

Definition at line 391 of file pdf.inc.

392  {
393  $this->convertor->coverPage($url);
394  }
if(! $blog->published||! $blog->enable_rss_feed||!checkRole($blog->allow_read)) $url
Definition: rss.inc:58

◆ footer()

PDF::footer (   $text,
  $position = "center",
  $size = 11 
)
Parameters
$text- text of the footer
$position- valid positions are left, right, and center
$size- font size for the footer ?? doesn't work

Definition at line 402 of file pdf.inc.

403  {
404  $this->convertor->footer($text, $position, $size);
405  }
$size
Definition: download.inc:47

◆ generate()

PDF::generate ( )

Definition at line 407 of file pdf.inc.

408  {
409  return $this->convertor->generate();
410  }

◆ PDF()

PDF::PDF (   $uri,
  $ssl = false,
  $useToken = true,
  $output = null,
  $landscape = false 
)

Creates a new PDF object configured to generate a PDF from the supplied URI on the local web application.

Parameters
string$urithe URI that will generate the content for the PDF
boolean$sslwhether to use SSL to access the URI
boolean$useTokenset to true to use an AutoLogin token to use the credentials of the currently logged in user to generate the PDF content
string$output(optional) a local output file path if the PDF output is to be saved to disk (for caching, or as an intermeediate step)
boolean$landscapetrue for landscape orientated output, false for portrait oriented output (the default)

Definition at line 375 of file pdf.inc.

376  {
377  $this->uri = $uri;
378  $this->ssl = $ssl;
379  $this->useToken = $useToken;
380  $this->output = $output;
381  $this->landscape = $landscape;
382  $this->convertor = PdfManager::createConvertor($this);
383  }
$output
Definition: pdf.inc:362
$landscape
Definition: pdf.inc:364
$ssl
Definition: pdf.inc:361
$uri
Definition: pdf.inc:360
static createConvertor($pdf)
Definition: pdf_manager.inc:53

Member Data Documentation

◆ $footer

PDF::$footer

Definition at line 363 of file pdf.inc.

◆ $landscape

PDF::$landscape = false

Definition at line 364 of file pdf.inc.

◆ $output

PDF::$output

Definition at line 362 of file pdf.inc.

◆ $ssl

PDF::$ssl

Definition at line 361 of file pdf.inc.

◆ $uri

PDF::$uri

Definition at line 360 of file pdf.inc.


The documentation for this class was generated from the following file: