🎨 Remove the footer Export by SiYuan when exporting image and PDF Fix https://github.com/siyuan-note/siyuan/issues/7838

This commit is contained in:
Liang Ding 2023-03-31 10:51:18 +08:00
parent 1f7fc4cc8f
commit 8a2a724341
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
10 changed files with 1 additions and 29 deletions

View file

@ -98,7 +98,6 @@
"regex": "Regex", "regex": "Regex",
"keywordsLimit": "Keywords Limit", "keywordsLimit": "Keywords Limit",
"exportAsImage": "Export as image", "exportAsImage": "Export as image",
"exportBySiYuan": "Export by SiYuan",
"featureBetaStage": "This feature support is currently in the free public beta stage, and there is no clear charging plan yet, please know", "featureBetaStage": "This feature support is currently in the free public beta stage, and there is no clear charging plan yet, please know",
"syncOfficialProviderIntro": "Currently selected is the cloud storage service officially provided by SiYuan, which only supports paid subscription users", "syncOfficialProviderIntro": "Currently selected is the cloud storage service officially provided by SiYuan, which only supports paid subscription users",
"syncThirdPartyProviderS3Intro": "The current selected is a third-party cloud storage service compatible with the Amazon S3 protocol (eg <a href=\"https://s.qiniu.com/VbQfeu\" target=\"_blank\">Qiniu</a>, <a href=\"https://www.aliyun.com/product/oss?userCode=yqovuas2\" target=\"_blank\">Aliyun OSS</a>, <a href=\"https://www.cloudflare.com/\" target=\"_blank\">Cloudflare R2</a>)", "syncThirdPartyProviderS3Intro": "The current selected is a third-party cloud storage service compatible with the Amazon S3 protocol (eg <a href=\"https://s.qiniu.com/VbQfeu\" target=\"_blank\">Qiniu</a>, <a href=\"https://www.aliyun.com/product/oss?userCode=yqovuas2\" target=\"_blank\">Aliyun OSS</a>, <a href=\"https://www.cloudflare.com/\" target=\"_blank\">Cloudflare R2</a>)",
@ -741,8 +740,6 @@
"export18": "After enabling, insert the document title as a heading 1 at the beginning", "export18": "After enabling, insert the document title as a heading 1 at the beginning",
"export19": "Path to Pandoc executable", "export19": "Path to Pandoc executable",
"export20": "Exporting Word .docx files requires format conversion using <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a>", "export20": "Exporting Word .docx files requires format conversion using <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a>",
"export21": "Export PDF with footer",
"export22": "After enabling, add <code class='fn__code'>Export by SiYuan</code> at the footer of the exported PDF",
"export23": "Export Markdown wit YFM", "export23": "Export Markdown wit YFM",
"export24": "After enabling, add some general metadata information at the beginning of the exported Markdown file", "export24": "After enabling, add some general metadata information at the beginning of the exported Markdown file",
"blockRef": "Ref Block", "blockRef": "Ref Block",

View file

@ -98,7 +98,6 @@
"regex": "Regex", "regex": "Regex",
"keywordsLimit": "Límite de palabras clave", "keywordsLimit": "Límite de palabras clave",
"exportAsImage": "Exportar como imagen", "exportAsImage": "Exportar como imagen",
"exportBySiYuan": "Exportar por SiYuan",
"featureBetaStage": "El soporte de esta función se encuentra actualmente en la etapa beta pública gratuita, y aún no hay un plan de carga claro, tenga en cuenta", "featureBetaStage": "El soporte de esta función se encuentra actualmente en la etapa beta pública gratuita, y aún no hay un plan de carga claro, tenga en cuenta",
"syncOfficialProviderIntro": "Actualmente seleccionado es el servicio de almacenamiento en la nube proporcionado oficialmente por SiYuan, que solo admite usuarios de suscripción paga", "syncOfficialProviderIntro": "Actualmente seleccionado es el servicio de almacenamiento en la nube proporcionado oficialmente por SiYuan, que solo admite usuarios de suscripción paga",
"syncThirdPartyProviderS3Intro": "El actual seleccionado es un servicio de almacenamiento en la nube de terceros compatible con el protocolo Amazon S3", "syncThirdPartyProviderS3Intro": "El actual seleccionado es un servicio de almacenamiento en la nube de terceros compatible con el protocolo Amazon S3",
@ -741,8 +740,6 @@
"export18": "Después de habilitar, inserte el título del documento como encabezado 1 al principio", "export18": "Después de habilitar, inserte el título del documento como encabezado 1 al principio",
"export19": "Ruta de acceso al ejecutable de Pandoc", "export19": "Ruta de acceso al ejecutable de Pandoc",
"export20": "La exportación de archivos Word .docx requiere la conversión del formato mediante <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a>", "export20": "La exportación de archivos Word .docx requiere la conversión del formato mediante <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a>",
"export21": "Exportar PDF con pie de página",
"export22": "Después de habilitar, agregue <code class='fn__code'>Exportar por SiYuan</code> al pie de página del PDF exportado",
"export23": "Exportar descuento con YFM", "export23": "Exportar descuento con YFM",
"export24": "Después de habilitar, agregue información general de metadatos al comienzo del archivo Markdown exportado", "export24": "Después de habilitar, agregue información general de metadatos al comienzo del archivo Markdown exportado",
"blockRef": "Bloque de referencia", "blockRef": "Bloque de referencia",

View file

@ -98,7 +98,6 @@
"regex": "Regex", "regex": "Regex",
"keywordsLimit": "Limite de mots clés", "keywordsLimit": "Limite de mots clés",
"exportAsImage": "Exporter en tant qu'image", "exportAsImage": "Exporter en tant qu'image",
"exportBySiYuan": "Exporter par SiYuan",
"featureBetaStage": "La prise en charge de cette fonctionnalité est actuellement en phase de bêta publique gratuite et il n'y a pas encore de plan de facturation clair, veuillez savoir", "featureBetaStage": "La prise en charge de cette fonctionnalité est actuellement en phase de bêta publique gratuite et il n'y a pas encore de plan de facturation clair, veuillez savoir",
"syncOfficialProviderIntro": "Actuellement sélectionné est le service de stockage en nuage officiellement fourni par SiYuan, qui ne prend en charge que les utilisateurs d'abonnement payant", "syncOfficialProviderIntro": "Actuellement sélectionné est le service de stockage en nuage officiellement fourni par SiYuan, qui ne prend en charge que les utilisateurs d'abonnement payant",
"syncThirdPartyProviderS3Intro": "L'actuel sélectionné est un service de stockage cloud tiers compatible avec le protocole Amazon S3", "syncThirdPartyProviderS3Intro": "L'actuel sélectionné est un service de stockage cloud tiers compatible avec le protocole Amazon S3",
@ -741,8 +740,6 @@
"export18": "Après activation, insérez le titre du document comme titre 1 au début", "export18": "Après activation, insérez le titre du document comme titre 1 au début",
"export19": "Chemin vers l'exécutable Pandoc", "export19": "Chemin vers l'exécutable Pandoc",
"export20": "L'exportation de fichiers Word .docx nécessite une conversion de format à l'aide de <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a>", "export20": "L'exportation de fichiers Word .docx nécessite une conversion de format à l'aide de <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a>",
"export21": "Exporter un PDF avec pied de page",
"export22": "Après l'activation, ajoutez <code class='fn__code'>Exporter par SiYuan</code> au pied de page du PDF exporté",
"export23": "Exporter Markdown avec YFM", "export23": "Exporter Markdown avec YFM",
"export24": "Après l'activation, ajoutez des informations générales sur les métadonnées au début du fichier Markdown exporté", "export24": "Après l'activation, ajoutez des informations générales sur les métadonnées au début du fichier Markdown exporté",
"blockRef": "Bloc Réf", "blockRef": "Bloc Réf",

View file

@ -98,7 +98,6 @@
"regex": "正則表達式", "regex": "正則表達式",
"keywordsLimit": "關鍵字數量限制", "keywordsLimit": "關鍵字數量限制",
"exportAsImage": "導出為圖片", "exportAsImage": "導出為圖片",
"exportBySiYuan": "由思源筆記導出",
"featureBetaStage": "該特性支持目前處於免費公測階段,目前尚未有明確的收費計劃,請悉知", "featureBetaStage": "該特性支持目前處於免費公測階段,目前尚未有明確的收費計劃,請悉知",
"syncOfficialProviderIntro": "當前選擇的是 SiYuan 官方提供的雲端存儲服務,僅支持付費訂閱用戶使用", "syncOfficialProviderIntro": "當前選擇的是 SiYuan 官方提供的雲端存儲服務,僅支持付費訂閱用戶使用",
"syncThirdPartyProviderS3Intro": "當前選擇的是 Amazon S3 協議兼容的第三方雲端存儲服務(比如<a href=\"https://s.qiniu.com/VbQfeu\" target=\"_blank\">七牛雲</a>、<a href=\"https://www.aliyun.com/product/oss?userCode=yqovuas2\" target=\"_blank\">阿里雲 OSS</a>、<a href=\"https://www.cloudflare.com/\" target=\"_blank\">Cloudflare R2</a>", "syncThirdPartyProviderS3Intro": "當前選擇的是 Amazon S3 協議兼容的第三方雲端存儲服務(比如<a href=\"https://s.qiniu.com/VbQfeu\" target=\"_blank\">七牛雲</a>、<a href=\"https://www.aliyun.com/product/oss?userCode=yqovuas2\" target=\"_blank\">阿里雲 OSS</a>、<a href=\"https://www.cloudflare.com/\" target=\"_blank\">Cloudflare R2</a>",
@ -741,8 +740,6 @@
"export18": "啟用後將文檔標題以一級標題的形式插入到開頭", "export18": "啟用後將文檔標題以一級標題的形式插入到開頭",
"export19": "Pandoc 可執行文件路徑", "export19": "Pandoc 可執行文件路徑",
"export20": "導出 Word .docx 文件需要使用 <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a> 進行格式轉換", "export20": "導出 Word .docx 文件需要使用 <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a> 進行格式轉換",
"export21": "導出 PDF 添加頁腳",
"export22": "開啟後在導出的 PDF 頁腳處添加 <code class='fn__code'>由思源筆記導出</code>",
"export23": "導出 Markdown 添加 YFM", "export23": "導出 Markdown 添加 YFM",
"export24": "啟用後在導出的 Markdown 文件開頭處添加一些較為通用的元數據信息", "export24": "啟用後在導出的 Markdown 文件開頭處添加一些較為通用的元數據信息",
"blockRef": "引用塊", "blockRef": "引用塊",

View file

@ -98,7 +98,6 @@
"regex": "正则表达式", "regex": "正则表达式",
"keywordsLimit": "关键字数量限制", "keywordsLimit": "关键字数量限制",
"exportAsImage": "导出为图片", "exportAsImage": "导出为图片",
"exportBySiYuan": "由思源笔记导出",
"featureBetaStage": "该特性支持目前处于免费公测阶段,目前尚未有明确的收费计划,请悉知", "featureBetaStage": "该特性支持目前处于免费公测阶段,目前尚未有明确的收费计划,请悉知",
"syncOfficialProviderIntro": "当前选择的是 SiYuan 官方提供的云端存储服务,仅支持付费订阅用户使用", "syncOfficialProviderIntro": "当前选择的是 SiYuan 官方提供的云端存储服务,仅支持付费订阅用户使用",
"syncThirdPartyProviderS3Intro": "当前选择的是 Amazon S3 协议兼容的第三方云端存储服务(比如<a href=\"https://s.qiniu.com/VbQfeu\" target=\"_blank\">七牛云</a>、<a href=\"https://www.aliyun.com/product/oss?userCode=yqovuas2\" target=\"_blank\">阿里云 OSS</a>、<a href=\"https://www.cloudflare.com/\" target=\"_blank\">Cloudflare R2</a>", "syncThirdPartyProviderS3Intro": "当前选择的是 Amazon S3 协议兼容的第三方云端存储服务(比如<a href=\"https://s.qiniu.com/VbQfeu\" target=\"_blank\">七牛云</a>、<a href=\"https://www.aliyun.com/product/oss?userCode=yqovuas2\" target=\"_blank\">阿里云 OSS</a>、<a href=\"https://www.cloudflare.com/\" target=\"_blank\">Cloudflare R2</a>",
@ -741,8 +740,6 @@
"export18": "启用后将文档标题以一级标题的形式插入到开头", "export18": "启用后将文档标题以一级标题的形式插入到开头",
"export19": "Pandoc 可执行文件路径", "export19": "Pandoc 可执行文件路径",
"export20": "导出 Word .docx 文件需要使用 <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a> 进行格式转换", "export20": "导出 Word .docx 文件需要使用 <a href=\"https://pandoc.org\" target=\"_blank\">Pandoc</a> 进行格式转换",
"export21": "导出 PDF 添加页脚",
"export22": "启用后在导出的 PDF 页脚处添加 <code class='fn__code'>由思源笔记导出</code>",
"export23": "导出 Markdown 添加 YFM", "export23": "导出 Markdown 添加 YFM",
"export24": "启用后在导出的 Markdown 文件开头处添加一些较为通用的元数据信息", "export24": "启用后在导出的 Markdown 文件开头处添加一些较为通用的元数据信息",
"blockRef": "引用块", "blockRef": "引用块",

View file

@ -27,14 +27,6 @@ export const exportConfig = {
<span class="fn__space"></span> <span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="addTitle" type="checkbox"${window.siyuan.config.export.addTitle ? " checked" : ""}/> <input class="b3-switch fn__flex-center" id="addTitle" type="checkbox"${window.siyuan.config.export.addTitle ? " checked" : ""}/>
</label> </label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.export21}
<div class="b3-label__text">${window.siyuan.languages.export22}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="addFooter" type="checkbox"${window.siyuan.config.export.addFooter ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label"> <label class="fn__flex b3-label">
<div class="fn__flex-1"> <div class="fn__flex-1">
${window.siyuan.languages.export23} ${window.siyuan.languages.export23}
@ -137,7 +129,6 @@ export const exportConfig = {
fetchPost("/api/setting/setExport", { fetchPost("/api/setting/setExport", {
paragraphBeginningSpace: (exportConfig.element.querySelector("#paragraphBeginningSpace") as HTMLInputElement).checked, paragraphBeginningSpace: (exportConfig.element.querySelector("#paragraphBeginningSpace") as HTMLInputElement).checked,
addTitle: (exportConfig.element.querySelector("#addTitle") as HTMLInputElement).checked, addTitle: (exportConfig.element.querySelector("#addTitle") as HTMLInputElement).checked,
addFooter: (exportConfig.element.querySelector("#addFooter") as HTMLInputElement).checked,
markdownYFM: (exportConfig.element.querySelector("#markdownYFM") as HTMLInputElement).checked, markdownYFM: (exportConfig.element.querySelector("#markdownYFM") as HTMLInputElement).checked,
blockRefMode: parseInt((exportConfig.element.querySelector("#blockRefMode") as HTMLSelectElement).value, 10), blockRefMode: parseInt((exportConfig.element.querySelector("#blockRefMode") as HTMLSelectElement).value, 10),
blockEmbedMode: parseInt((exportConfig.element.querySelector("#blockEmbedMode") as HTMLSelectElement).value, 10), blockEmbedMode: parseInt((exportConfig.element.querySelector("#blockEmbedMode") as HTMLSelectElement).value, 10),

View file

@ -39,7 +39,6 @@ export const exportImage = (id: string) => {
`, `,
content: `<div class="b3-dialog__content" style="max-height: 70vh;overflow: auto;${isMobile() ? "padding:8px;" : ""};background-color: var(--b3-theme-background)"> content: `<div class="b3-dialog__content" style="max-height: 70vh;overflow: auto;${isMobile() ? "padding:8px;" : ""};background-color: var(--b3-theme-background)">
<div style="${isMobile() ? "padding: 16px;margin: 16px 0" : "padding: 48px;margin: 8px 0 24px"};border: 1px solid var(--b3-border-color);border-radius: 10px;" class="export-img protyle-wysiwyg${window.siyuan.config.editor.displayBookmarkIcon ? " protyle-wysiwyg--attr" : ""}" id="preview"></div> <div style="${isMobile() ? "padding: 16px;margin: 16px 0" : "padding: 48px;margin: 8px 0 24px"};border: 1px solid var(--b3-border-color);border-radius: 10px;" class="export-img protyle-wysiwyg${window.siyuan.config.editor.displayBookmarkIcon ? " protyle-wysiwyg--attr" : ""}" id="preview"></div>
<div class="ft__smaller ft__on-surface fn__flex"><img style="height: 18px;margin: 0 8px" src="stage/icon.png">${window.siyuan.languages.exportBySiYuan}</div>
<div class="fn__hr--b"></div> <div class="fn__hr--b"></div>
<div class="fn__hr--b"></div> <div class="fn__hr--b"></div>
</div> </div>

View file

@ -310,7 +310,6 @@ declare interface IExport {
pandocBin: string pandocBin: string
paragraphBeginningSpace: boolean; paragraphBeginningSpace: boolean;
addTitle: boolean; addTitle: boolean;
addFooter: boolean;
markdownYFM: boolean; markdownYFM: boolean;
} }

View file

@ -275,7 +275,7 @@ export const initWindow = () => {
}; };
setStorageVal(Constants.LOCAL_EXPORTPDF, window.siyuan.storage[Constants.LOCAL_EXPORTPDF]); setStorageVal(Constants.LOCAL_EXPORTPDF, window.siyuan.storage[Constants.LOCAL_EXPORTPDF]);
try { try {
if (window.siyuan.config.export.addFooter) { if (false) { // TODO 已经移除了之前的“由思源笔记导出”页脚https://github.com/siyuan-note/siyuan/issues/7838后面如果需要的话换成自定义页脚
ipcData.pdfOptions.displayHeaderFooter = true; ipcData.pdfOptions.displayHeaderFooter = true;
ipcData.pdfOptions.headerTemplate = "<span></span>"; ipcData.pdfOptions.headerTemplate = "<span></span>";
ipcData.pdfOptions.footerTemplate = `<div style="width:100%;margin-right:${ipcData.pdfOptions.margins.right}in;display: flex;line-height:12px;"> ipcData.pdfOptions.footerTemplate = `<div style="width:100%;margin-right:${ipcData.pdfOptions.margins.right}in;display: flex;line-height:12px;">

View file

@ -19,7 +19,6 @@ package conf
type Export struct { type Export struct {
ParagraphBeginningSpace bool `json:"paragraphBeginningSpace"` // 是否使用中文排版段落开头空两格 ParagraphBeginningSpace bool `json:"paragraphBeginningSpace"` // 是否使用中文排版段落开头空两格
AddTitle bool `json:"addTitle"` // 是否添加标题 AddTitle bool `json:"addTitle"` // 是否添加标题
AddFooter bool `json:"addFooter"` // 是否添加页脚
BlockRefMode int `json:"blockRefMode"` // 内容块引用导出模式2锚文本块链3仅锚文本4块引转脚注0使用原始文本1使用 Blockquote。0 和 1 都已经废弃 https://github.com/siyuan-note/siyuan/issues/3155 BlockRefMode int `json:"blockRefMode"` // 内容块引用导出模式2锚文本块链3仅锚文本4块引转脚注0使用原始文本1使用 Blockquote。0 和 1 都已经废弃 https://github.com/siyuan-note/siyuan/issues/3155
BlockEmbedMode int `json:"blockEmbedMode"` // 内容块引用导出模式0使用原始文本1使用 Blockquote BlockEmbedMode int `json:"blockEmbedMode"` // 内容块引用导出模式0使用原始文本1使用 Blockquote
BlockRefTextLeft string `json:"blockRefTextLeft"` // 内容块引用导出锚文本左侧符号,默认留空 BlockRefTextLeft string `json:"blockRefTextLeft"` // 内容块引用导出锚文本左侧符号,默认留空
@ -35,7 +34,6 @@ func NewExport() *Export {
return &Export{ return &Export{
ParagraphBeginningSpace: false, ParagraphBeginningSpace: false,
AddTitle: true, AddTitle: true,
AddFooter: true,
BlockRefMode: 3, BlockRefMode: 3,
BlockEmbedMode: 1, BlockEmbedMode: 1,
BlockRefTextLeft: "", BlockRefTextLeft: "",