pdf data format writer  
 More...
|  | 
|  | $extension = ".pdf" | 
|  | 
|  | $mimetype = "application/pdf" | 
|  | 
|  | 
| string[] | $columns | 
|  | Title of columns in the current sheet. 
 | 
|  | 
| float | $colwidth | 
|  | Each column's width in the current sheet. 
 | 
|  | 
| $filename | $filename = '' | 
|  | 
| string | $filepath = '' | 
|  | The location to store the output content. 
 | 
|  | 
| pdf | $pdf | 
|  | The pdf object that is used to generate the pdf file. 
 | 
|  | 
pdf data format writer 
- Copyright
- 2019 Shamim Rezaie shami.nosp@m.m@mo.nosp@m.odle..nosp@m.com 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ close_output()
      
        
          | dataformat_pdf\writer::close_output | ( |  | ) |  | 
      
 
 
◆ close_output_to_file()
      
        
          | dataformat_pdf\writer::close_output_to_file | ( |  | ) |  | 
      
 
 
◆ close_sheet()
  
  | 
        
          | core\dataformat\base::close_sheet | ( |  | $columns | ) |  |  | inherited | 
 
 
◆ export_html_image_source()
  
  | 
        
          | dataformat_pdf\writer::export_html_image_source | ( | \stored_file | $file | ) |  |  | protected | 
 
When exporting images, we need to return their Base64 encoded content. 
Otherwise TCPDF will create a HTTP request for them, which will lead to the login page (i.e. not the image it expects) and throw an exception
Note: ideally we would copy the file to a temp location and return it's path, but a bug in TCPDF currently prevents that
- Parameters
- 
  
  
- Return values
- 
  
  
Reimplemented from core\dataformat\base.
 
 
◆ format_record()
  
  | 
        
          | core\dataformat\base::format_record | ( |  | $record | ) |  |  | protectedinherited | 
 
Apply formatting to the cells of a given record. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ get_extension()
  
  | 
        
          | core\dataformat\base::get_extension | ( |  | ) |  |  | inherited | 
 
Get the file extension. 
- Return values
- 
  
  
 
 
◆ replace_pluginfile_images()
  
  | 
        
          | core\dataformat\base::replace_pluginfile_images | ( | ?string | $content | ) |  |  | protectedinherited | 
 
We need to locate all img tags within a given cell that match pluginfile URL's. 
Partly so the exported file will show the image without requiring the user is logged in; and also to prevent some of the dataformats requesting the file themselves, which is likely to fail due to them not having an active session
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ send_http_headers()
      
        
          | dataformat_pdf\writer::send_http_headers | ( |  | ) |  | 
      
 
Output file headers to initialise the download of the file. 
Reimplemented from core\dataformat\base.
 
 
◆ set_filename()
  
  | 
        
          | core\dataformat\base::set_filename | ( |  | $filename | ) |  |  | inherited | 
 
Set download filename base. 
- Parameters
- 
  
  
 
 
◆ set_filepath()
  
  | 
        
          | core\dataformat\base::set_filepath | ( | string | $filepath | ) |  |  | inherited | 
 
Set file path when writing to file. 
- Parameters
- 
  
  
- Exceptions
- 
  
  
 
 
◆ set_sheettitle()
  
  | 
        
          | core\dataformat\base::set_sheettitle | ( |  | $title | ) |  |  | inherited | 
 
 
◆ start_output()
      
        
          | dataformat_pdf\writer::start_output | ( |  | ) |  | 
      
 
 
◆ start_output_to_file()
      
        
          | dataformat_pdf\writer::start_output_to_file | ( |  | ) |  | 
      
 
Start output to file, note that the actual writing of the file is done in {. 
- See also
- close_output_to_file()} 
Reimplemented from core\dataformat\base.
 
 
◆ start_sheet()
      
        
          | dataformat_pdf\writer::start_sheet | ( |  | $columns | ) |  | 
      
 
Write the start of the sheet we will be adding data to. 
- Parameters
- 
  
  
Reimplemented from core\dataformat\base.
 
 
◆ supports_html()
      
        
          | dataformat_pdf\writer::supports_html | ( |  | ) |  | 
      
 
Method to define whether the dataformat supports export of HTML. 
- Return values
- 
  
  
Reimplemented from core\dataformat\base.
 
 
◆ write_record()
      
        
          | dataformat_pdf\writer::write_record | ( |  | $record, | 
        
          |  |  |  | $rownum ) | 
      
 
 
The documentation for this class was generated from the following file: