Issue 146483 in chromium: Blank paper when printing from Pepper Flash

21 views
Skip to first unread message

chro...@googlecode.com

unread,
Sep 5, 2012, 2:43:38 AM9/5/12
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 Area-Undefined OS-Windows

New issue 146483 by internet...@gmail.com: Blank paper when printing from
Pepper Flash
http://code.google.com/p/chromium/issues/detail?id=146483

Chrome Version : 21.0.1180.89
OS Version: 6.0 (Windows Vista, Windows Server 2008)
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5: Not Tested
Firefox 14.0.1: Ok
IE 7/8/9: Ok

What steps will reproduce the problem?
1. Go to http://www.sudokuxl.com/
2. Click "Print" at the bottom left corner just under the Sudoku puzzle.

What is the expected result?
A Sudoku Puzzle is printed.

What happens instead?
A blank page is printed.

Please provide any additional information below. Attach a screenshot if
possible.
The problem only occurs when using Flash Version: 11,4,402,265
Shockwave Flash 11.4 r402. If this version is disabled at chrome://plugins/
and an earlier flash version is used then it works ok.

The same problem appears on this non-related sudoku website:
http://www.sudoku.org.uk/Puzzles/Sudoku.asp

UserAgentString: Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.1
(KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1



Attachments:
disabled-latest-flash-versi.gif 16.5 KB
blank-paper.gif 8.1 KB

chro...@googlecode.com

unread,
Sep 7, 2012, 8:29:43 PM9/7/12
to chromi...@chromium.org
Updates:
Labels: Feature-Printing

Comment #1 on issue 146483 by w...@chromium.org: Blank paper when printing
(No comment was entered for this change.)

chro...@googlecode.com

unread,
Sep 7, 2012, 8:33:43 PM9/7/12
to chromi...@chromium.org
Updates:
Labels: Feature-Flash

Comment #2 on issue 146483 by abod...@chromium.org: Blank paper when

chro...@googlecode.com

unread,
Sep 14, 2012, 1:00:46 AM9/14/12
to chromi...@chromium.org

Comment #3 on issue 146483 by mat...@autech.com.au: Blank paper when
Have same issue with a site made by our company.

Have reproduced the issue and observed the following on both our site and
http://www.sudokuxl.com/

Please see attached flashversion.jpg:
Unlike the original poster my flash version 11.4.402.265 (gcswf32.dll)
successfully printed.

So did my OS plugin 11.3.300.268 (C:\WINDOWS\SysWOW64)

It was my 11.3.31.232 (PepperFlash) that failed by printing a white page
instead.

The only other difference I can see at this stage is that my 11.3.31.232
(PepperFlash) shows the Chrome Print Preview window when I attempt to print.
The other 2 versions of Flash that work seem to use the sytem print dialog
instead.

The Oringal Poster's attached blank-paper.gif shows the Print Preview
window being involved when they reproduce the issue as well.

I can reproduce the issue in Chrome: Version 23.0.1265.0 canary as well.


Attachments:
flashversion.jpg 96.3 KB

chro...@googlecode.com

unread,
Nov 26, 2013, 11:16:39 AM11/26/13
to chromi...@chromium.org

Comment #8 on issue 146483 by lgu...@gmail.com: Blank paper when printing
This code produces a blank page in PepperFlash using print preview. System
dialog works fine, FF works fine, IE works fine.....


public function printScreen() : void
{

const debug:Boolean = true;

//var pj:FlexPrintJob = new FlexPrintJob();
var pj:PrintJob = new PrintJob();
//pj.printAsBitmap = false;

if( !pj.start() ) return;

//
// Once the print job is started,
// the page dimensions will be set.
//

if (debug) Alert.show("Printer Page dimensions " + pj.pageWidth
+ " x " + pj.pageHeight + " ");

// page dimensions are zero prior to start.
var c:DrawingCanvas;
c = this.canvas;

//var b:Rectangle = c.getBounds(c);
//var b:Rectangle = new Rectangle(-c.x, -c.y, stage.width,
stage.height);
var b:Rectangle = new Rectangle(-c.x, -c.y, this.width,
this.height);
if (debug) Alert.show("canvas Width x Height " + c.width + "
x " + c.height + " stage Width x Height " + stage.width + " x " +
stage.height);
if (debug) Alert.show("rect x, y, w, h " + b.x + ", " +
b.y+ ", " + b.width+ ", " + b.height);

var drawWidth:int = pj.pageWidth - 2*printMarginSize;
var drawHeight:int =pj.pageWidth - 2*printMarginSize;

var f:Number = 1.0;

if (b.width > pj.pageWidth || b.height > pj.pageHeight) {

var wFactor:Number = drawWidth / b.width;
var hFactor:Number = drawHeight / b.height;

if (wFactor < hFactor) f = wFactor;
else f = hFactor;

}

var m:Matrix = new Matrix();

if (debug) Tracer.trace2("scale " + f);
m.scale(f, f);
m.translate(-(b.x * f), -(b.y * f));

var bitmap:BitmapData = new BitmapData(b.width * f, b.height *
f);
bitmap.draw(c, m, null, null, new Rectangle(0,0, bitmap.width,
bitmap.height), true);
if (debug)
Alert.show(" bitmap w,h=" + bitmap.width+ "," +
bitmap.height + " pageWidth, pageHeight=" + pj.pageWidth +"," +
pj.pageHeight);

var sheet1:Sprite = new Sprite();
sheet1.graphics.beginBitmapFill(bitmap);
sheet1.graphics.drawRect(0, 0, bitmap.width, bitmap.height);
sheet1.graphics.endFill();

var marginWidth:Number = (pj.pageWidth-bitmap.width)/2;
var marginHeight:Number = (pj.pageHeight-bitmap.height)/2;
var rect:Rectangle = new Rectangle(-marginWidth, -marginHeight,
pj.pageWidth, pj.pageHeight);

pj.addPage(sheet1, rect);

pj.send();

}


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Aug 4, 2014, 6:37:05 PM8/4/14
to chromi...@chromium.org

Comment #9 on issue 146483 by reyna...@gmail.com: Blank paper when printing
This is also an issue for me in Chrome 36.0.1985.125 Pepperflash
14.0.0.145. Verified using the methods above with sudoku and the code
presented. My app has similar code as above but instead of filling a
graphics object with bitmap data I am just adding a UIComponent to the
stage. Same results are found. Disabling pepperflash and using another
plugin prints fine.

Please fix

chro...@googlecode.com

unread,
Nov 12, 2014, 9:13:48 AM11/12/14
to chromi...@chromium.org

Comment #10 on issue 146483 by Andrey.L...@gmail.com: Blank paper when
printing from Pepper Flash
https://code.google.com/p/chromium/issues/detail?id=146483

Adding DisplayObject to stage before printing solves the issue.

chro...@googlecode.com

unread,
Dec 22, 2015, 12:04:37 PM12/22/15
to chromi...@chromium.org

Comment #12 on issue 146483 by raph151...@gmail.com: Blank paper when
printing from Pepper Flash
https://code.google.com/p/chromium/issues/detail?id=146483

this bug exists for ages, it is still breaking my projects when running on
chrome. It's impossible to have the print working for 4 years.
It's been declared several times and each decision has been made to avoid
working on it like cowards.
Chrome never implemented correctly this basic feature, which is a shame.
I'm still receiving complaints form customers. I never forget to say it's a
chrome bug but it doesn't solves the pepperflash issue.

pepper flash is a school case of how to totally ruin a plugin. And
how "improving" the system dialog does nothing more than breaking what
works everywhere else. At least provide the choice to force the usage of
system dialog.
Reply all
Reply to author
Forward
0 new messages