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:
- 
                     
Download ctrlp.zip, Print_OK.pdf, Print_Not_OK.pdf.
 - 
                     
Unzip ctrlp.zip into a local directory.
 - 
                     
Open genapp.pbw workspace in PB.
 - 
                     
Click on menu entry File > Printer Setup.
 - 
                     
Select a networked Sharp printer (The SHARP MX-4101 printer was used in our testing.)
 - 
                     
Click on menu entry Run > Run genapp.
 - 
                     
Once the application is running, click on File > New… > Untitled for Sheet 1.
 - 
                     
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
 - 
                     
Expected behavior is to print the active sheet (See Print_OK.pdf).
 - 
                     
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.
Solution
If we modified the printer driver to the Sharp universal driver, it resolved the issue.


