I'm receiving error "PrintTicket XML is not well-formed. Root element is missing." when calling document.Print I have a reference to the ReachFramework as it looks like it has a dependency on that?
Receiving error PrintTicket XML is not well-formed. Root element is missing. when calling document.Print
Hi Dan,
Could you tell us you are using Document.Print method and what parameters are you passing in?
Thanks, Jure Leskovec
Document document = Document.Load(inputFilePath);
document.Print(printerName);
Dan,
We will do some tests in our environment. In the meantime, can you switch from XPS to GDI+ print engine:
EngineSettings.DefaultPrintEngine = PrintEngine.GdiPlus;
That worked. Anything I should know about this engine vs XPS?
Docentric Toolkit has two engines implemented: XPS and GDI+. The vast majority of software uses GDI+ subsystem. This one is older than XPS. It seems that MS has discontinued development/support for XPS APIs and we also noticed cases where XPS is not stable for server-side printing, while GDI+ printing was.
We enabled XPS as the default printing engine because lit was a better printing Windows subsystem with benefits over the old GDI+. Still MS obviously abandoned it and we will switch the default to GDI+ in the next public release (v5.1).
GDI+ seems to be safe also for server side printing. We have been using this print engine for some time in our sister product Docentric AX for server-side printing and we have never had an issue reported.
GDI+ safe and you should stick with it. When you will install the new version you can remove that line that switches to the GDI+, since GDI+ will be the default option.
Regards, Jure