CMS  Version 3.9
Screenshot Class Reference

Public Member Functions

 __construct ($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 413 of file pdf.inc.

Constructor & Destructor Documentation

◆ __construct()

Screenshot::__construct (   $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 430 of file pdf.inc.

431  {
432  $this->uri = $uri;
433  $this->ssl = $ssl;
434  $this->useToken = $useToken;
435  $this->output = $output;
436  $this->landscape = $landscape;
437  $this->convertor = PdfManager::createConvertor($this);
438  }
static createConvertor($pdf)
Definition: pdf_manager.inc:53
$landscape
Definition: pdf.inc:419

Member Function Documentation

◆ coverPage()

Screenshot::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 446 of file pdf.inc.

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

◆ footer()

Screenshot::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 457 of file pdf.inc.

458  {
459  $this->convertor->footer($text, $position, $size);
460  }
$size
Definition: download.inc:47

◆ generate()

Screenshot::generate ( )

Definition at line 462 of file pdf.inc.

463  {
464  return $this->convertor->screenshot();
465  }

Member Data Documentation

◆ $footer

Screenshot::$footer

Definition at line 418 of file pdf.inc.

◆ $landscape

Screenshot::$landscape = false

Definition at line 419 of file pdf.inc.

◆ $output

Screenshot::$output

Definition at line 417 of file pdf.inc.

◆ $ssl

Screenshot::$ssl

Definition at line 416 of file pdf.inc.

◆ $uri

Screenshot::$uri

Definition at line 415 of file pdf.inc.


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