PdfPrinterService
OfficeIMO.Workflows
Delivers print jobs to IPP printers by URI, to CUPS queues through the local scheduler, and to Windows queues through GDI.
Inheritance
- object
- PdfPrinterService
Remarks
IPP printers receive vector PDF when they accept application/pdf, and PWG raster otherwise. Grayscale jobs stay vector PDF only for printers that also list the monochrome print-color-mode, unless PdfPrintDeliveryOptions.RasterizeGrayscale is set. CUPS queues are reached over IPP at the local scheduler; when the scheduler is not reachable that way, or the queue is a discovered destination that the scheduler has not created yet, the CUPS command-line tools deliver the PDF instead. Windows queues receive raster sheets at the device resolution.
Constructors
public PdfPrinterService() #Creates a service that uses the local CUPS scheduler where one is installed.
Methods
public Task<PdfPrintJobStatus> CancelJobAsync(string printerName, string jobId, CancellationToken cancellationToken = default) #Asks the queue to cancel a job and returns its state afterwards. A job that has already finished is reported unchanged.
Parameters
- printerName string
- The receipt's PdfPrintSubmission.PrinterName.
- jobId string
- The receipt's PdfPrintSubmission.JobId.
- cancellationToken System.Threading.CancellationToken = default
- Cancels the request; the job may already be canceled.
Returns
Task<PdfPrintJobStatus>public Task<PdfPrinterCapabilities> GetCapabilitiesAsync(string printerName, CancellationToken cancellationToken = default) #Reports the selected printer's media, trays and features without changing printer settings.
Parameters
- printerName string
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<PdfPrinterCapabilities>public Task<PdfPrintJobStatus> GetJobAsync(string printerName, string jobId, CancellationToken cancellationToken = default) #Reads the current state of a submitted job.
Parameters
- printerName string
- The receipt's PdfPrintSubmission.PrinterName.
- jobId string
- The receipt's PdfPrintSubmission.JobId.
- cancellationToken System.Threading.CancellationToken = default
- Cancels the query.
Returns
Task<PdfPrintJobStatus>public Task<IReadOnlyList<PdfPrinterInfo>> GetPrintersAsync(CancellationToken cancellationToken = default) #Lists installed queues without changing printer settings.
Parameters
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<IReadOnlyList<PdfPrinterInfo>>public Task<PdfPrintSubmission> SubmitAsync(PdfPrintJob job, PdfPrintDeliveryOptions options, CancellationToken cancellationToken = default) #Submits a composed job and returns an acceptance receipt.
Parameters
- job OfficeIMO.Workflows.PdfPrintJob
- options OfficeIMO.Workflows.PdfPrintDeliveryOptions
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<PdfPrintSubmission>