By v kogut - Friday, September 21, 2012
Hi All
I have an issue with print preview dialog Graphics Settings, when I set Compositing Mode to Source Copy and press OK I get the "Parameter is not valid." error
The Call Stack: at System.Drawing.Graphics.ResetClip() at Nevron.GraphicsCore.N2DDeviceGDI.set_ClipInfo(lI1l1I1l value) at Nevron.GraphicsCore.l1ll1I11l.Restore(l1I11ll1 device) at Nevron.GraphicsCore.l1I11ll1.Restore(Int32 cookie) at Nevron.Diagram.Extensions.NPrintDocument.OnPrintPage(PrintPageEventArgs e) at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e) at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document) at System.Drawing.Printing.PrintController.Print(PrintDocument document) at System.Drawing.Printing.PrintDocument.Print() at System.Windows.Forms.PrintPreviewControl.ComputePreview() at System.Windows.Forms.PrintPreviewControl.CalculatePageInfo() at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
I'm using the following code for print preview NPrintManager printManager = new NPrintManager(new NDrawingDocument()); printManager.ShowPrintPreview();
It is reproducible on W7, W2k8 R2, W8
Does anyone know how to fix this?
Thanks Vasyl
|
By Nevron Support - Friday, October 5, 2012
Probably GDI+ graphics does not allow ResetClip with SourceCopy compositing during printing. Anyway we have used another techinque for safe page device printing that should solve this issue. The fix must appear in the next service pack.
|
By Andrii Katsalap - Friday, January 4, 2013
I have used latest version of Nevron (12.12.17.12), but now we have another crash with this scenario:
System.Drawing -> Parameter is not valid.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.DrawPath(Pen pen, GraphicsPath path) at Nevron.GraphicsCore.lI1II1ll.PaintPath(GraphicsPath path) at Nevron.Diagram.NPathPrimitive.PaintClosedFigureAppearance(NPaintContext context, GraphicsPath path, NFillStyle fillStyle, NStrokeStyle strokeStyle) at Nevron.Diagram.NPathPrimitive.PaintClosedFigure(NPaintContext context) at Nevron.Diagram.NPathPrimitive.Paint(NPaintContext context) at Nevron.Diagram.NTablePrimitive.PaintAppearance(NPaintContext context, NFillStyle fillStyle, NStrokeStyle strokeStyle) at Nevron.Diagram.NTablePrimitive.Paint(NPaintContext context) at Nevron.Diagram.NDiagramElementCompositeImpl.SplitPaint(NPaintContext context) at Nevron.Diagram.NAggregateModel.Paint(NPaintContext context) at Nevron.Diagram.NShape.Paint(NPaintContext context) at Nevron.Diagram.NDiagramElementCompositeImpl.Paint(NPaintContext context) at Nevron.Diagram.NLayer.Paint(NPaintContext context) at Nevron.Diagram.NDiagramElementCompositeImpl.Paint(NPaintContext context) at Nevron.Diagram.NLayerCollection.Paint(NPaintContext context) at Nevron.Diagram.NDiagramElementCompositeImpl.Paint(NPaintContext context) at Nevron.Diagram.NDrawingDocument.Paint(NPaintContext context) at Nevron.Diagram.Extensions.NCanvas.Paint(l1ll1l11I device, PaintReason reason) at Nevron.Diagram.Extensions.NPrintDocument.OnPrintPage(PrintPageEventArgs e) at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e) at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document) at System.Drawing.Printing.PrintController.Print(PrintDocument document) at System.Drawing.Printing.PrintDocument.Print() at System.Windows.Forms.PrintPreviewControl.ComputePreview() at System.Windows.Forms.PrintPreviewControl.CalculatePageInfo() at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
It happens in case if we're trying to print NDrawingDocument, which have any text inside.
|
|