From 267621806a80abaf80759ee76b57efae651d2571 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 22 Oct 2022 22:04:18 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/6300 --- app/pnpm-lock.yaml | 4 +- app/src/protyle/export/index.ts | 74 ++++++++++++++++++++++++--------- app/src/util/onGetConfig.ts | 2 +- 3 files changed, 57 insertions(+), 23 deletions(-) diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml index dba95fdd6..4bb6cfa28 100644 --- a/app/pnpm-lock.yaml +++ b/app/pnpm-lock.yaml @@ -1906,10 +1906,10 @@ packages: resolution: {integrity: sha512-m0+M53+HYMzqKxwNQZT143K7WwXEGUy9LY31l8dJphXx2P/FQod615mVbxHyqbDCG4J5bHdWm21qZ0e2DVY6CQ==} engines: {node: '>=14.0.0'} dependencies: - 7zip-bin: 5.1.1 '@develar/schema-utils': 2.6.5 '@electron/universal': 1.2.1 '@malept/flatpak-bundler': 0.4.0 + 7zip-bin: 5.1.1 async-exit-hook: 2.0.1 bluebird-lst: 1.0.9 builder-util: 23.3.3 @@ -2193,9 +2193,9 @@ packages: /builder-util/23.3.3: resolution: {integrity: sha512-MJZlUiq2PY5hjYv9+XNaoYdsITqvLgRDoHSFg/4nzpInbNxNjLQOolL04Zsyp+hgfcbFvMC4h0KkR1CMPHLWbA==} dependencies: - 7zip-bin: 5.1.1 '@types/debug': 4.1.7 '@types/fs-extra': 9.0.13 + 7zip-bin: 5.1.1 app-builder-bin: 4.0.0 bluebird-lst: 1.0.9 builder-util-runtime: 9.0.3 diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 4544155ac..fcea53443 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -63,12 +63,11 @@ export const saveExport = (option: { type: string, id: string }) => { /// #if !BROWSER const renderPDF = (id: string) => { const localData = JSON.parse(localStorage.getItem(Constants.LOCAL_EXPORTPDF) || JSON.stringify({ - printBackground: true, landscape: false, margins: { - marginType: "default", + marginType: "0", }, - scaleFactor: 100, + scale: 1, pageSize: "A4", removeAssets: true, keepFold: false, @@ -161,17 +160,18 @@ const renderPDF = (id: string) => {