0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

Merge pull request #1194 from penpot/fix-pdf-pages

Fix pdf pages
This commit is contained in:
Andrey Antukh 2021-09-09 14:27:24 +02:00 committed by GitHub
commit b280b5a517
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -80,8 +80,8 @@
(mf/use-effect
(mf/deps width height)
#(dom/set-page-style {:size (str (mth/round width) "px "
(mth/round height) "px")}))
#(dom/set-page-style {:size (str (mth/ceil (+ width padding padding)) "px "
(mth/ceil (+ height padding padding)) "px")}))
[:& (mf/provider embed/context) {:value true}
[:svg {:id "screenshot"

View file

@ -55,6 +55,10 @@
(.insertAdjacentHTML head "beforeend"
(str "<style>"
" @page {" style-str "}"
" html, body {" ; Fix issue having Chromium to add random 1px marging at the bottom
" overflow: hidden;" ; https://github.com/puppeteer/puppeteer/issues/2278#issuecomment-410381934
" font-size: 0;"
" }"
"</style>"))))
(defn get-element-by-class