mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	desktop app(export pdf): add page numbering
This commit is contained in:
		
							parent
							
								
									50514e2418
								
							
						
					
					
						commit
						a1dfeb14e1
					
				| @ -75,7 +75,14 @@ ipcMain.on("export-as-pdf", async (e, opts: ExportAsPdfOpts) => { | ||||
|     let buffer: Buffer; | ||||
|     try { | ||||
|         buffer = await browserWindow.webContents.printToPDF({ | ||||
|             landscape: opts.landscape | ||||
|             landscape: opts.landscape, | ||||
|             displayHeaderFooter: true, | ||||
|             headerTemplate: `<div></div>`, | ||||
|             footerTemplate: ` | ||||
|                 <div style="width: 100%; text-align: center; font-size: 10pt;"> | ||||
|                     <span class="pageNumber"></span> | ||||
|                 </div> | ||||
|             ` | ||||
|         }); | ||||
|     } catch (e) { | ||||
|         dialog.showErrorBox(t("pdf.unable-to-export-title"), t("pdf.unable-to-export-message")); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Adorian Doran
						Adorian Doran