XpsDocumentWriter ignores print tickets.
Hi everyone.
I've noticed that XpsDocumentWriter doesn't write the print tickets of its argument into the stream.
For example, when the following code is run, the xps document target_file won't contain a document-level print ticket:
FixedDocument fd= new FixedDocument();
//Add pages and stuff here.
fd.PrintTicket = new PrintTicket();
((PrintTicket)fd.PrintTicket).PageOrientation = PageOrientation.Landscape;
XpsDocument target_file = new XpsDocument(output_path,FileAccess.ReadWrite);
XpsDocumentWriter target_stream = XpsDocument.CreateXpsDocumentWriter(target_file);
target_stream.Write(doc1);
target_file.Close();
A way to get around this is to use the two-argument overload,
target_stream.Write(doc1, (PrintTicket)doc1.PrintTicket);
but that wouldn't be of any help if each page of doc1 had its own PrintTicket attached.
So here's my question: is there any way to get XpsDocumentWriter to write the whole PrintTicket hierarchy, or am I limited to a single PrintTicket?
Thanks in advance for the help,
William

