Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/present: The stylesheet for slide printing is broken #29480

Closed
tell-k opened this issue Dec 31, 2018 · 1 comment
Closed

x/tools/cmd/present: The stylesheet for slide printing is broken #29480

tell-k opened this issue Dec 31, 2018 · 1 comment

Comments

@tell-k
Copy link

tell-k commented Dec 31, 2018

What version of Go are you using (go version)?

$ go version
go version go1.11.2 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tell_k/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tell_k/Work"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.2/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/76/c44g23853nzd4mm7w9q22h540000gp/T/go-build950278746=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I tried to print a slide made with present package on Google Chrome(Version: 71.0.3578.98)

What did you expect to see?

it would be possible to print slides beautifully on a page by page basis.

What did you see instead?

The slide spans multiple pages. And I cannot not print beautifully.

For example, when printing this slide(https://talks.golang.org/2017/state-of-go-may.slide), it is broken as follows.

the_state_of_go

@gopherbot gopherbot added this to the Unreleased milestone Dec 31, 2018
tell-k added a commit to tell-k/tools that referenced this issue Dec 31, 2018
slide.js in the present package automatically scale up and scale down
the slide according to the size of the browser.
It is using "transoform property" of stylesheet.

However, at the time of printing, the "transform property" remains, and
the stylesheet for printing is broken.
I modified it so that "transform property" is reset when printing.

Fixes golang/go#29480
@tell-k tell-k changed the title x/tools/cmd/present: The stylesheet for slide printing is broken cmd/present: The stylesheet for slide printing is broken Jan 3, 2019
@dmitshur dmitshur changed the title cmd/present: The stylesheet for slide printing is broken x/tools/cmd/present: The stylesheet for slide printing is broken Jan 6, 2019
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/155940 mentions this issue: cmd/present: fix CSS when printing slides

tell-k added a commit to tell-k/tools that referenced this issue Jan 22, 2019
slide.js in the present package automatically scale up and scale down
the slide according to the size of the browser.
It is using "transoform property" of stylesheet.

However, at the time of printing, the "transform property" remains, and
the stylesheet for printing is broken.
I modified it so that "transform property" is reset when printing.

Fixes golang/go#29480
@golang golang locked and limited conversation to collaborators Jan 23, 2020
tmc pushed a commit to tmc/presentx that referenced this issue Jun 19, 2024
The existing CSS style was causing slides to not align with page
boundaries when printing slides. The cause of that is the CSS transform
property that is applied to automatically scale size of slides.
This change clears the transform property just before printing.

Fixes golang/go#29480

Change-Id: I6f719ad1b716e9bda8ba83007c3d1d7dece9ce08
GitHub-Last-Rev: d46dfee57601b2e9127c5e8e80e596dc2a2f24fa
GitHub-Pull-Request: golang/tools#67
Reviewed-on: https://go-review.googlesource.com/c/155940
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants