I have downloaded SpireDoc and use the NET2.0 versions of the DLL (which I assume is Standard 2.0).
We are testing if we can convert Word documents to PDF and lucky enough there is a code sample showing that:
- Code: Select all
Spire.Doc.Document spireDocument = new Spire.Doc.Document();
spireDocument.LoadFromFile(@"E:\work\documents\TestSample.docx");
spireDocument.SaveToStream(new MemoryStream(), FileFormat.PDF);
I have added namespace and changed variable name to reduce the list of possible errors. Finally I have replaced SaveToFile with SaveToStream.
When I compile it, I get following errors for the SaveToStream:
Error CS0117 'FileFormat' does not contain a definition for 'PDF'
FileFormat seem not to be containing a PDF option (but your example do)
What am I doing wrong?
PS. I use the DLL's from the latest hotfix and only those. Is that a problem? I have enclosed the license file.