0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00

🐛 Fix pdf print on exporter

This commit is contained in:
Andrey Antukh 2022-03-23 14:46:04 +01:00
parent 88ad68069c
commit a0762aca45
2 changed files with 11 additions and 8 deletions

View file

@ -73,10 +73,12 @@
(defn pdf
([page] (pdf page {}))
([page {:keys [scale save-path]
:or {scale 1}}]
([page {:keys [scale save-path page-ranges]
:or {page-ranges "1"
scale 1}}]
(.pdf ^js page #js {:path save-path
:scale scale
:pageRanges page-ranges
:printBackground true
:preferCSSPageSize true})))
(defn eval!

View file

@ -7,6 +7,7 @@
(ns app.main.ui.render
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.geom.matrix :as gmt]
[app.common.geom.point :as gpt]
[app.common.geom.shapes :as gsh]
@ -103,7 +104,7 @@
(mf/with-effect [width height]
(dom/set-page-style!
{:size (str (mth/ceil width) "px "
{:size (dm/str (mth/ceil width) "px "
(mth/ceil height) "px")}))
[:& (mf/provider embed/context) {:value embed?}