How can I open/save a PDF document with a Unicode path using PDFNet for C++?

Q:

How can I open/save a document with a Unicode path using PDFNet SDK 3.5
for C++?
---

A:

To open a file using a Unicode path you can use StdFile constructor
with wchar_t parameter.

For example:

const wchar_t* path = L"myfile.pdf";
AutoPtr<Filters::Filter> stream(new Filters::StdFile(path,
Filters::StdFile::e_read_mode));
PDFDoc doc(stream);
...

To save a file using a Unicode path, you could serialize the file in
memory (as illustrated in PDFDocMemoryTest) and then write the data
using any file IO API.

Also, the upcoming PDFNet version has a version of 'Save' method that
directly accepts wchar_t*