Nevron Forum

Print to XPS crash.

https://www.nevron.com/Forum/Topic7345.aspx

By Iryna Borzenko - Monday, January 21, 2013

Hello,

I have got a crash on try to print Diagram to XPS using NPrintManager dialog (OS's: w2k8r2 x64 EN, w2k3 x64 EN). Is it known issue? How to fix it?

Here is my code... Maybe I did something wrong...

namespace TestXPS
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
var shape1 = new NTableShape(200, 200, 50, 50);
var shape2 = new NTableShape(400, 200, 50, 50);
var connector = new NLineShape();
nDrawingDocument1.ActiveLayer.AddChild(shape1);
nDrawingDocument1.ActiveLayer.AddChild(shape2);
nDrawingDocument1.ActiveLayer.AddChild(connector);
connector.FromShape = shape1;
connector.ToShape = shape2;
}

private void button1_Click(object sender, EventArgs e)
{
var printManager = new NPrintManager(nDrawingDocument1)
{
PageSettings = new PageSettings(),
Layout = PagedLayout.FitToPages
};
printManager.ShowPrintPreview();
}
}
}

Thanks in advance!

Note: current problem isn't actual for all instances of Windows Server 2008 R2 x64 EN and Windows Server 2003 x64 EN but I reproduced it on several.
By Nevron Support - Friday, March 15, 2013

As far as we know there are problems with the Windows build-in print settings dialog and the build-in print preview on some 64-bit Windows, which are fixed by applying a Windows Service Pack.
Have you applied any service packs on the Windows Server 2008 R2 x64 EN installation?
By Iryna Borzenko - Monday, March 18, 2013

Yes, and it did not help. If I try XPS print using another programs and everything works well. Also I had a chance to reproduce it on Windows 7 x64 SP1 with the latest updates (Hardware: Intel Xeon, 4 GB RAM), but it is not constant for all such OS's.

Please provide some workarounds for this issue or just detailed description of situations when the user can experience this issue (operating system, configurations, hardware etc.).

Thanks in advance!