Esporta (0) Stampa
Espandi tutto

Metodo PrintQueue.MergeAndValidatePrintTicket (PrintTicket, PrintTicket, PrintTicketScope)

Merges two PrintTickets and guarantees that the resulting PrintTicket is valid, does not ask for any printing functionality that the printer does not support, and is limited to the specified scope.

Spazio dei nomi: System.Printing
Assembly: System.Printing (in system.printing.dll)

public ValidationResult MergeAndValidatePrintTicket (
	PrintTicket basePrintTicket,
	PrintTicket deltaPrintTicket,
	PrintTicketScope scope
)
public ValidationResult MergeAndValidatePrintTicket (
	PrintTicket basePrintTicket, 
	PrintTicket deltaPrintTicket, 
	PrintTicketScope scope
)
public function MergeAndValidatePrintTicket (
	basePrintTicket : PrintTicket, 
	deltaPrintTicket : PrintTicket, 
	scope : PrintTicketScope
) : ValidationResult
Non applicabile.

Parametri

basePrintTicket

The first print ticket.

deltaPrintTicket

The second print ticket. This can be riferimento null (Nothing in Visual Basic). See Remarks.

scope

A value indicating whether the scope of deltaPrintTicket, and the scope of the print ticket returned in the ValidationResult, is a page, a document, or the whole job.

Valore restituito

A ValidationResult that includes the merged PrintTicket and an indication of whether any of its settings had to be changed to guarantee viability.

Tipo di eccezioneCondizione

ArgumentException

At least one of the input print tickets is not valid.

ArgumentNullException

The basePrintTicket is riferimento null (Nothing in Visual Basic).

ArgumentOutOfRangeException

The scope parameter does not have a valid PrintTicketScope value.

PrintQueueException

The validation, merger, and viability checking operation failed.

The method produces a viable print ticket; that is, a ticket that does not request printing features that the printer does not support. The method first validates the two input print tickets against the Print Schema. If either are invalid, an exception is thrown. See Exceptions.

The two tickets are then merged. If they have different values for a particular property then the resulting merged ticket initially uses the value of the delta ticket.

The merged ticket is then checked against the actual capabilities of the printer. If any settings in the ticket are incompatible with the printer's capabilities, then the printer driver changes those settings by using whatever logic it wants. Typically, it will substitute the user's or printer's default value for the setting. It the driver's source of substitute values is not the same ticket as basePrintTicket, then it is possible that the merged ticket will have some settings that are different from both of the input tickets. If the printer driver has to change any settings then this fact is reported in the ConflictStatus property of the ValidationResult.

To merge and validate based on a print queue’s default settings, you should set basePrintTicket to the DefaultPrintTicket or the UserPrintTicket.

The deltaPrintTicket parameter can be null, in which case the basePrintTicket is validated, checked for viability, and returned, possibly with changes.

If the scope is a job, then the print ticket returned in the ValidationResult can include Print Schema parameters with Job, Document, and Page prefixes. If the scope is a document, then per-job settings in deltaPrintTicket will be ignored and the returned ticket can include parameters with Document and Page prefixes. If the scope is a page, then the per-job settings and the per-document settings in deltaPrintTicket will be ignored and the returned ticket can include parameters with only the Page prefix.

Microsoft .NET Framework 3.0 è supportato in Windows Vista, Microsoft Windows XP SP2 e Windows Server 2003 SP1.

.NET Framework

Supportato in:

Aggiunte alla community

AGGIUNGI
Microsoft sta conducendo un sondaggio in linea per comprendere l'opinione degli utenti in merito al sito Web di MSDN. Se si sceglie di partecipare, quando si lascia il sito Web di MSDN verrà visualizzato il sondaggio in linea.

Si desidera partecipare?
Mostra:
© 2014 Microsoft