## IPdfConverter::ConvertToPdf(System::SharedPtr\<Document\>, System::String) method


Converts PUB document into PDF format and saves result as PDF file.

```cpp
virtual void Aspose::Pub::IPdfConverter::ConvertToPdf(System::SharedPtr<Document> doc, System::String fileName)=0
```


| Parameter | Type | Description |
| --- | --- | --- |
| doc | System::SharedPtr\<Document\> | PUB document |
| fileName | System::String | name of PDF file |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Document](../../document/)
* Class [String](../../../system/string/)
* Class [IPdfConverter](../)
* Namespace [Aspose::Pub](../../)
* Library [Aspose.PUB for C++](../../../)
## IPdfConverter::ConvertToPdf(System::SharedPtr\<Document\>, System::SharedPtr\<System::IO::Stream\>) method


Converts PUB document into PDF format and saves result in stream passed.

```cpp
virtual void Aspose::Pub::IPdfConverter::ConvertToPdf(System::SharedPtr<Document> doc, System::SharedPtr<System::IO::Stream> outputStream)=0
```


| Parameter | Type | Description |
| --- | --- | --- |
| doc | System::SharedPtr\<Document\> | PUB document |
| outputStream | System::SharedPtr\<System::IO::Stream\> | output stream |

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Document](../../document/)
* Class [Stream](../../../system.io/stream/)
* Class [IPdfConverter](../)
* Namespace [Aspose::Pub](../../)
* Library [Aspose.PUB for C++](../../../)
