[DevExpress Support Team: CLONED FROM T315786: XtraLayout Control ShowPrintPreview does not work like it used to]
"The document does not contain any pages" message is shown when the ShowPrintPreview method is called for the second time
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
- v15.2.4Download Official Update
- v15.1.9Download Official Update
Hello,
I have reproduced the issue and forwarded this ticket to our R&D team. We will research the issue and update the thread as soon as we obtain any additional information.
As a workaround, you can use the following code:
DevExpress.XtraPrinting.ComponentPrinter cp = new DevExpress.XtraPrinting.ComponentPrinter(<your LayoutControl>); cp.CreateDocument(); cp.ShowPreview(<your LayoutControl>.LookAndFeel);