## Chart::ToPdf(const U16String\&) method


Saves the chart to a pdf file.

```cpp
void Aspose::Cells::Charts::Chart::ToPdf(const U16String &fileName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fileName | const U16String\& | the pdf file name with full path |

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [Chart](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## Chart::ToPdf(const char16_t*) method


Saves the chart to a pdf file.

```cpp
void Aspose::Cells::Charts::Chart::ToPdf(const char16_t *fileName)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fileName | const char16_t* | the pdf file name with full path |

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [Chart](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## Chart::ToPdf(const U16String\&, float, float, PageLayoutAlignmentType, PageLayoutAlignmentType) method


Saves the chart to a pdf file.

```cpp
void Aspose::Cells::Charts::Chart::ToPdf(const U16String &fileName, float desiredPageWidth, float desiredPageHeight, PageLayoutAlignmentType hAlignmentType, PageLayoutAlignmentType vAlignmentType)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fileName | const U16String\& | the pdf file name with full path |
| desiredPageWidth | float | The desired page width in inches. |
| desiredPageHeight | float | The desired page height in inches. |
| hAlignmentType | PageLayoutAlignmentType | The chart horizontal alignment type in the output page. |
| vAlignmentType | PageLayoutAlignmentType | The chart vertical alignment type in the output page. |

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Enum [PageLayoutAlignmentType](../../../aspose.cells/pagelayoutalignmenttype/)
* Class [Chart](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## Chart::ToPdf(const char16_t*, float, float, PageLayoutAlignmentType, PageLayoutAlignmentType) method


Saves the chart to a pdf file.

```cpp
void Aspose::Cells::Charts::Chart::ToPdf(const char16_t *fileName, float desiredPageWidth, float desiredPageHeight, PageLayoutAlignmentType hAlignmentType, PageLayoutAlignmentType vAlignmentType)
```


| Parameter | Type | Description |
| --- | --- | --- |
| fileName | const char16_t* | the pdf file name with full path |
| desiredPageWidth | float | The desired page width in inches. |
| desiredPageHeight | float | The desired page height in inches. |
| hAlignmentType | PageLayoutAlignmentType | The chart horizontal alignment type in the output page. |
| vAlignmentType | PageLayoutAlignmentType | The chart vertical alignment type in the output page. |

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Enum [PageLayoutAlignmentType](../../../aspose.cells/pagelayoutalignmenttype/)
* Class [Chart](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## Chart::ToPdf() method


Creates the chart PDF and saves it to a stream.

```cpp
Vector<uint8_t> Aspose::Cells::Charts::Chart::ToPdf()
```


| Parameter | Type | Description |
| --- | --- | --- |

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [Chart](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## Chart::ToPdf(float, float, PageLayoutAlignmentType, PageLayoutAlignmentType) method


Creates the chart pdf and saves it to a stream.

```cpp
Vector<uint8_t> Aspose::Cells::Charts::Chart::ToPdf(float desiredPageWidth, float desiredPageHeight, PageLayoutAlignmentType hAlignmentType, PageLayoutAlignmentType vAlignmentType)
```


| Parameter | Type | Description |
| --- | --- | --- |
| stream | float | The output stream. |
| desiredPageWidth | float | The desired page width in inches. |
| desiredPageHeight | PageLayoutAlignmentType | The desired page height in inches. |
| hAlignmentType | PageLayoutAlignmentType | The chart horizontal alignment type in the output page. |

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Enum [PageLayoutAlignmentType](../../../aspose.cells/pagelayoutalignmenttype/)
* Class [Chart](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
