Open Bug 1487467 Opened 6 years ago Updated 2 years ago

Print to PDF text not selectable and rasterized on Ubuntu (for text printed with fillText() API in mozPrintCallback)

Categories

(Core :: Printing: Output, defect, P3)

x86
Linux
defect

Tracking

()

Tracking Status
firefox61 --- affected
firefox62 --- affected
firefox63 --- affected

People

(Reporter: laszlo.bialis, Unassigned)

References

()

Details

Attachments

(3 files)

Attached image testnightlycomparedpdf.PNG (deleted) —
[Affected versions]: Latest Nightly 63.0a1 Latest Beta 62.0 Latest Release 61.0.2 [Affected platforms]: Ubuntu 16.04 x32 [Steps to reproduce]: Launch Firefox Nightly. Navigate to https://bugzilla.mozilla.org/attachment.cgi?id=8798493 From the menu select Print Then Print to PDF Inspect the saved file [Expected result]: The "Test" text under "... loading print" sections must be vectorized and selectable. [Actual result]: The "Test" text is not selectable and seems to be rasterized (see attached testnightlycomparedpdf.PNG ) compared to the same PDF saved from Win10. [Additional notes]: The issue is present on Ubuntu only. also attaching the PDF files genearted from Ubuntu and Win10
Attached file testnightlyubuntu.pdf (deleted) —
Attached file testnightlywin10.pdf (deleted) —
Summary: Print to PDF text not selectable and rasterized on Ubuntu → Print to PDF text not selectable and rasterized on Ubuntu (for text printed with fillText() API in mozPrintCallback)
I can reproduce back a long way (on Linux Mint here), with and without e10s enabled. The bug 1308259 patch was specifically for macOS, so unsurprisingly, I can reproduce even after that landed. Do we need to add any special handling in DrawTargetCairo::CreateSimilarDrawTarget for whatever surface type we're using on Linux?
Flags: needinfo?(jwatt)
Priority: -- → P3
I suspect we do. Something matching whatever surface type we end up getting when calling gfxPlatformGtk::CreateOffscreenSurface: https://dxr.mozilla.org/mozilla-central/rev/17c314f6930d2b8d6e456aa9e9d41407a45c3008/gfx/thebes/gfxPlatformGtk.cpp#127 We would need the surface type to have the concept of "layers" and for cairo to expose that to us. (If not then our only option for correct rendering is to draw into a raster image and composite it unfortunately.) From a quick look at the following search results I'm not seeing anything promising: https://dxr.mozilla.org/mozilla-central/search?q=_surface_create_ path%3Agfx%2Fcairo%2Fcairo%2Fsrc%2Fcairo- ext%3Ah It's also possible that switching to using Skia PDF on Linux (bug 1322653) would fix this.
Flags: needinfo?(jwatt)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: