New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 616763 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Closed: Jan 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature



Sign in to add a comment

Print-to-XPS (XML Paper Specification) in Chrome on Windows

Project Member Reported by halcanary@chromium.org, Jun 2 2016

Issue description

OS: Windows 6.1+

Make use of Skia's `SkDocument::MakeXPS()`
 
BTW, did you mean to label the components Internals>Printing and Internals>Skia, rather than "InternalsPrinting" and "InternalsSkia" ?
Components: Internals>Printing Internals>Skia
Labels: -InternalsPrinting -InternalsSkia
thx
TODO:

1) We need to figure out how to integrate SkXPS into Chrome.  We can compile it and change MakePDF to MakeXPS, but it fails due to permissions in the sandboxed printing process.  bungeman@ I looked at this a few months ago, but have not gotten back to it.

2) Add a PrintPagesToXPS() javascript function we could use for testing.

3) Find/develop a tool to rasterize a XPS document for testing.

4) Add a Save-as-XPS option in the Windows/Chrome print dialog.

5) Find out how to send a XPS document to a printer in Windows.

6) Test, Test, debug, test, debug, test.

7) Put it all together and bypass pdf+pdfium for prtinting.
Cc: thestig@chromium.org

Comment 5 by jw...@jwatt.org, Oct 6 2016

> 5) Find out how to send a XPS document to a printer in Windows.

Assuming Windows XP is no longer supported, the XPS Print API looks like the likely candidate:

https://msdn.microsoft.com/en-us/library/windows/desktop/ff728890(v=vs.85).aspx

Note the entry page to the docs for that API:

https://msdn.microsoft.com/en-us/library/windows/desktop/ff686814(v=vs.85).aspx

now says:

"The XPS Print API is not supported and may be altered or unavailable in the future. Client applications should use the Print Document Package API instead."

The Print Document Package API is only supported as of Windows 8 though.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/64c8b8a56326e9b6aa1cd08bd79b22d3862bf10a

commit 64c8b8a56326e9b6aa1cd08bd79b22d3862bf10a
Author: skia-deps-roller <skia-deps-roller@chromium.org>
Date: Thu Oct 13 17:50:20 2016

Roll src/third_party/skia/ 1eab44260..a634b7423 (1 commit).

https://chromium.googlesource.com/skia.git/+log/1eab44260211..a634b742320a

$ git log 1eab44260..a634b7423 --date=short --no-merges --format='%ad %ae %s'
2016-10-13 halcanary SkXPS: compile under clang on win

BUG= 616763 

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
TBR=jvanverth@google.com

Review-Url: https://codereview.chromium.org/2414083002
Cr-Commit-Position: refs/heads/master@{#425080}

[modify] https://crrev.com/64c8b8a56326e9b6aa1cd08bd79b22d3862bf10a/DEPS

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05683872522a0e03b9de2243a1f4f30a5e6d3dca

commit 05683872522a0e03b9de2243a1f4f30a5e6d3dca
Author: halcanary <halcanary@google.com>
Date: Wed Jan 04 16:45:14 2017

Implement SkEncodeImage()

This change replaces the implementation in SkImageEncoder_none.cpp with
an implementation that allows the layer above to define an image
encoding function.

Background:  Skia's (experimental) XPS backend needs a PNG encoder.
Skia for Chromium does not compile its PNG encoder, but there is one
available in Chrome's gfx component.  To make layering work right,
I allow the layer above skia (gfx) to define an encoding function
that can be installed into skia.

TODO: initialize the function pointer in printing process.

Also: Revert "SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS"
This reverts commit 1430e85be96647271e370c92c4940244dc149e76.

BUG= chromium:616763 

Review-Url: https://codereview.chromium.org/2527833002
Cr-Commit-Position: refs/heads/master@{#441395}

[modify] https://crrev.com/05683872522a0e03b9de2243a1f4f30a5e6d3dca/skia/BUILD.gn
[modify] https://crrev.com/05683872522a0e03b9de2243a1f4f30a5e6d3dca/skia/config/SkUserConfig.h
[add] https://crrev.com/05683872522a0e03b9de2243a1f4f30a5e6d3dca/skia/ext/skia_encode_image.cc
[add] https://crrev.com/05683872522a0e03b9de2243a1f4f30a5e6d3dca/skia/ext/skia_encode_image.h
[modify] https://crrev.com/05683872522a0e03b9de2243a1f4f30a5e6d3dca/ui/gfx/BUILD.gn
[add] https://crrev.com/05683872522a0e03b9de2243a1f4f30a5e6d3dca/ui/gfx/codec/skia_image_encoder_adapter.cc
[add] https://crrev.com/05683872522a0e03b9de2243a1f4f30a5e6d3dca/ui/gfx/codec/skia_image_encoder_adapter.h

Comment 11 by halcanary@google.com, Jan 21 (2 days ago)

Status: WontFix (was: Started)
It does not sound like anyone in Chrome wants this feature anymore.

Sign in to add a comment