Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

"Canvas Does Not Allow Drawing" on Windows 2016 with HP Printer

edited October 2017 in Devices
Hello,

One of our customers recently upgraded their systems to "Microsoft
Windows Server 2016 Standard". They are using a "HP LJ M806" printer to
print reports created with ReportBuilder.

With some printouts they get the error message "Canvas Does Not Allow
Drawing" when trying to print the report.

The same report, with the same software version (RB 18) on a different
operating system (e.g. Windows 2012 Server) is printed without any error
message.

The stacktrace at the time the error happend looks like this (copied for
our internal application-logfile):

EInvalidOperation
Canvas does not allow drawing

Location: $006AE298
at $006AE298 in unit: Vcl.Graphics, proc:
Vcl.Graphics.TCanvas.RequiredState, line: 0, ofln: 0

Stacktrace:
(002AD293){sfPrintJob.exe} [006AE293] Vcl.Graphics.TCanvas.RequiredState
+ $43
(0044C1FF){sfPrintJob.exe} [0084D1FF]
ppRotatedText.TppRotatedText.CalcRotatedOrigin + $43
(0044F965){sfPrintJob.exe} [00850965]
ppDrawInfo.TppDrawInfoText.CalcRotatedTextInfo + $A9
(0044F1D5){sfPrintJob.exe} [008501D5] ppDrawInfo.TppDrawInfoText.Create
+ $55
(005B146F){sfPrintJob.exe} [009B246F]
ppGraphicsRenderer.TppGraphicsRendererText.Initialize + $17
(0069C6E6){sfPrintJob.exe} [00A9D6E6]
ppGraphicsDevice.TppGraphicsDevice.Draw + $6E
(00698F80){sfPrintJob.exe} [00A99F80] ppDevice.TppDevice.DrawPage + $74

Any hint what we could do?

Thanks in advance,
Ralf

Comments

  • edited October 2017
    Hi Ralf,

    We have had some customers report issues with Windows 2016 Server RDP.

    Try the following using RB 18.02.

    - open ppPrintr.pas and modify this line

    {.$Define ppUseGetDefPrinterAPI}

    to this

    {$Define ppUseGetDefPrinterAPI}

    - add RBuilder\Source to the Delphi library path, in front of \Lib

    - rebuild the application






    Best regards,

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.