Symptom

  • Initiating an active sheet print (ctrl+p) incorrectly prints the application background.
  • The behavior only occurs with certain printer drivers to networked Shap printers (e.g. MX-4101)

Environment

  • PowerBuilder
  • Windows 7 x64

Reproducing the Issue

Steps to reproduce issue:

  1. Click on ctrlp.zip, Print_OK.zip, Print_Not_OK.pfd attachments to download
  2. Unzip ctrlp.zip into a local directory
  3. Open genapp.pbw workspace in PB
  4. Click on menu entry File > Printer Setup
  5. Select a networked Sharp printer (The SHARP MX-4101 printer was used in our testing.)
  6. Click on menu entry Run > Run genapp
  7. Once the application is running, click on File > New… > Untitled for Sheet 1
  8. Click on menu entry File > Print… Ctrl+p which invokes the following Powerscript:

//*-----------------------------------------------------------------*/
//*-----------------------------------------------------------------*/
//*    ue_print:   Print the Active Sheet
//*-----------------------------------------------------------------*/
long ll_job
w_genapp_basesheetlw_sheet
lw_sheet = this.GetActiveSheet ( )
If IsValid ( lw_sheet ) Then
 this.SetMicroHelp ( "Printing active sheet..." )
 ll_job = PrintOpen ( )
 lw_sheet.Print( ll_job, 1, 1 )
 PrintClose ( ll_job )
 this.SetMicroHelp ( "" )
End If
Return 1

    9.  Expected behavior is to print the active sheet (See Print_OK.pdf)

  10.  Using the networked Sharp printer causes the background to be printed (See Print_not_OK.pdf) on Windows 7 but works properly on Windows XP.

Cause

The root cause was determined to be the standard Sharp MX-4104 PCL printer driver.

Resolution

If we modified the printer driver to the Sharp universal driver, it resolved the issue.

Attachment
ctrlp.zip102.06 KB
Print_OK.pdf132.86 KB
0
0