# exportToPNG

### Description

@short: Exports a Scheduler into the PNG format

@signature: exportToPNG: (_export_?: any) =\> void

### Parameters

- `export` - (optional) *object* - an object with export settings (see the details)

### Example

~~~jsx
scheduler.exportToPNG();
 
//or
scheduler.exportToPNG({
      name:"my_beautiful_scheduler.png"
});

scheduler.exportToPNG({
    format:"A4",
    orientation:"portrait",
    zoom:1,
    header:"<h1>My company</h1>",
    footer:"<h4>Bottom line</h4>",
    server:"https://myapp.com/myexport/scheduler"
});
~~~

### Details

:::note
 This method is defined in the **export** extension, so you need to include it on the page:
~~~html
<script src="https://export.dhtmlx.com/scheduler/api.js"></script>  
~~~
Read the details in the [Export to PNG](export/png.md) article.
 
:::

The **exportToPNG()** method takes as a parameter an object with a number of properties (all the properties are optional):

<table class="webixdoc_links">
  <tbody>
  <tr>
  <td class="webixdoc_links0"><b>name</b></td>
  <td>(<i>string</i>) the name of the output file</td>
  </tr>
  <tr>
  <td class="webixdoc_links0"><b>format</b></td>
  <td>(<i>'A0', 'A1', 'A2', 'A3', 'A4', 'A5'</i>) the format of the output PNG image</td>
  </tr>
  <tr>
  <td class="webixdoc_links0"><b>orientation</b></td>
  <td>(<i>'portrait', 'landscape'</i>) sets the orientation of the output PNG image</td>
  </tr> 
  <tr>
  <td class="webixdoc_links0"><b>zoom</b></td>
  <td>(<i>number</i>) sets the zoom coefficient of the output PNG image</td>
  </tr>
  <tr>
  <td class="webixdoc_links0"><b>header</b></td>
  <td>(<i>string</i>) specifies the header that will be added to the output PNG image. Note, you can use any HTML here</td>
  </tr>
  <tr>
  <td class="webixdoc_links0"><b>footer</b></td>
  <td>(<i>string</i>) specifies the footer that will be added to the output PNG image. Note, you can use any HTML here</td>
  </tr>
  <tr>
  <td class="webixdoc_links0"><b>server</b></td>
  <td>(<i>string</i>) sets the API endpoint for the request. Can be used with the local install of the export service. The default value is <strong>https://export.dhtmlx.com/scheduler</strong></td>
  </tr>
  </tbody>
</table>

### Related Guides
- [Export to PNG](export/png.md)
