Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Jan 11, 2023 8:29 pm

Hi there,

I'm getting the following text "Evaluation Warning : The version can be used only for evaluation purpose..." at the top of a PDF generated from Spire.DOC, using the following code:

Document.SaveToFile(docFileName, format);

Where format is FileFormat.PDF

I'm using Spire.Doc version 10.7.5.3046 and Spire.Pdf version 8.7.2.1046, using a license for "Spire.Doc Pro Edition Developer OEM Subscription" purchased on January 10, 2023.

I'm setting my license key in the Main function of the Windows Forms application using:

Spire.License.LicenseProvider.SetLicenseKey("......");
Spire.License.LicenseProvider.LoadLicense();

jhanford
 
Posts: 6
Joined: Mon May 01, 2017 11:19 pm

Thu Jan 12, 2023 7:13 am

Hi,

Thanks for your inquiry.
I tested your license key with your version and the latest Spire.Doc (11.1.0), but I did not reproduce your issue, the license key works well, I have sent my demo and output file to you via email. In addition, you can try our latest Spire.Doc (https://www.e-iceblue.com/Download/download-word-for-net-now.html). If your issue still exists, you can send your project to us via email (support@e-iceblue.com), we will investigate and work out a solution for you. If you have any other questions, just feel free to contact us.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Thu Jan 12, 2023 10:11 pm

Hi there,

Working through the demo code you sent me - thank you by the way - and re-introducing parts of my code, I think I've found where the issue is: as part of my process flow, I will automatically print the document previously saved as a PDF, using the PdfDocument.PrintSettings property and PdfDocument.Print() method.

The saved PDF does NOT contain the watermark, but the printed copy does.

Is the printing of PDFs not included in my license for "Spire.Doc Pro Edition Developer OEM Subscription"?

Here's the code I use to automatically print the document, where docFileName is the filename of the already saved PDF, using Document.SaveToFile(docFileName, FileFormat.PDF)

var printer = Document.PrintDocument.DefaultPageSettings.PrinterSettings.PrinterName;
var pdf = new Spire.Pdf.PdfDocument();

pdf.LoadFromFile(docFileName);
pdf.PrintSettings.PrinterName = printer;
pdf.PrintSettings.PrintController = new StandardPrintController();
pdf.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize);
pdf.Print();

jhanford
 
Posts: 6
Joined: Mon May 01, 2017 11:19 pm

Fri Jan 13, 2023 2:55 am

Hi,

Thanks for your feedback.
Loading and printing pdf document is not included in Spire.Doc subscription, these functions belong to Spire.PDF. So, when you load and print the pdf documents, the warning messages appear.
For your situation, if you need to save the Word document to PDF document and print the PDF document, you need to buy the license for Spire.PDF. If you just need to print the Word document, you can see the following code for reference.
Code: Select all
            PrintDocument pd = doc.PrintDocument;
            //Add the property PrintController to hide the print processing dialog
            pd.PrintController = new StandardPrintController();
            pd.PrinterSettings.PrinterName= "Default";
            pd.Print();

If you have further questions, just feel free to contact us.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Fri Jan 13, 2023 4:51 pm

Thank you! That was it exactly.

And thank you for supplying a code example for me to work from. That helped me fix the code in a couple of minutes.

jhanford
 
Posts: 6
Joined: Mon May 01, 2017 11:19 pm

Mon Jan 16, 2023 6:25 am

Hi,

Thanks for your feedback.
We are glad to hear that your issue was solved, if you have any other questions, just feel free to contact us.
Have a nice day! :D

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.Doc