Add print functionality and native PDF support (v1.7.7)

- Added Print menu item with Ctrl+P keyboard shortcut for native OS printing
- Implemented print IPC handlers in main and renderer processes
- Remapped Toggle Preview from Ctrl+P to Ctrl+Shift+P to avoid conflicts
- Added PDFKit (v0.14.0) for native PDF generation without Pandoc
- Added html2pdf.js (v0.10.1) for HTML to PDF conversion
- Enhanced CLAUDE.md with new v1.7.7 feature documentation
- Print supports cross-platform printing (Windows, macOS, Linux)

Features:
- Native print dialog with background color printing
- Professional PDF export without system dependencies
- Improved portability and offline support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-24 22:10:30 +05:30
co-authored by Claude
parent ef3ce1647e
commit e1c0bc387f
4 changed files with 104 additions and 5 deletions
+12
View File
@@ -1149,6 +1149,18 @@ ipcRenderer.on('adjust-font-size', (event, action) => {
updateFontSizes(currentFontSize);
});
// Print document handler
ipcRenderer.on('print-document', () => {
// Use the preview pane for printing
const previewContent = document.getElementById('preview');
if (previewContent && previewContent.innerHTML.trim()) {
// Create a print window with the preview content
window.print();
} else {
alert('Nothing to print. Please create or open a document and ensure the preview is visible.');
}
});
// Export Dialog functionality
let currentExportFormat = null;