When I use PdfViewer.PrintDocumentWithSettings to send PDFs to a printer, the document name is always ‘document’. Is there a way to set change that for each print job? I tried setting PrinterSettings.PrintFileName, but that did not work.
We have found the issue you mentioned regarding document naming in printer queue. Your issue has been registered in our issue tracking system with issue id:PDFNEWNET-30312 We will further investigate and see if the feature can be supported soon. You will be notified via this forum thread regarding any updates on this issue.
I have asked our development team to share any updates and ETA regarding your mentioned issue. As soon as I get feedback, I will notify you via this forum thread.
We are about to release a new version of Aspose.Pdf for .NET 6.7.0 where we have made some changes to PdfViewer class and it automatically sets the file name as printer document name. Soon you will be updated with the status of correction. Please be patient and spare us little time.
I am afraid the feature is not supported at the moment. I have added a functionality enhancement in our issue tracking system to provide the feature “set a printer queue document name when it is loaded from MemoryStream” as per your requirement. The issue id is PDFNEWNET-33695.
We will notify you via this forum thread regarding any updates against this feature.
I am pleased to share that the feature requested earlier to specify the name of document in printer queue when using Stream object has been resolved. In order to support this feature we have introduced a new property named PrinterJobName in PdfViewer class. Please try using the latest release version of Aspose.Pdf for .NET 7.2.0 with following code snippet.
[C#]
PdfViewer view = new PdfViewer();
FileStream fs = new FileStream("d:/pdftest/1-Merged.pdf", FileMode.Open);
view.PrinterJobName = "Test: 33695";
view.OpenPdfFile(fs);
view.PrintDocument();
We have further investigated the issue PDFNEWNET-30312 reported earlier and in order to resolve this problem, please try using the following code snippet.
[C#]
```csharp
static void PDFNEWNET_30312()
{
(new Aspose.Pdf.License()).SetLicense(@"F:\_Sources\Aspose_5\trunk\testdata\License\Aspose.Pdf.lic");
string inFile = @"F:\ExternalTestsData\aj0051.pdf";
Aspose.Pdf.Facades.PdfViewer view = new Aspose.Pdf.Facades.PdfViewer();
view.PrinterJobName = "This is user defined name for printer job";
view.BindPdf(inFile);
view.PrintDocument();
}
```
The above code snippet returns the correct name of the printer’s job.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.