Add comprehensive print CSS for clean note printing#1757
Open
jacksbox-cassandra wants to merge 1 commit intonextcloud:mainfrom
Open
Add comprehensive print CSS for clean note printing#1757jacksbox-cassandra wants to merge 1 commit intonextcloud:mainfrom
jacksbox-cassandra wants to merge 1 commit intonextcloud:mainfrom
Conversation
- Hide UI elements (header, navigation, action buttons) in print mode - Optimize typography and layout for better readability on paper - Add proper page break controls and margin handling - Include @media print rules for tables, code blocks, and images - Ensure note content is properly formatted with readable fonts - Add Playwright tests to verify PDF generation and content validation - Verify UI elements are correctly hidden in print media Fixes nextcloud#179 The print CSS ensures that: - Only note content appears when printing (no headers/sidebars) - Text is optimized for print with proper fonts and sizing - Page breaks are handled appropriately for long content - Tables and code blocks are properly formatted - Images scale correctly to fit pages Tests verify that: - PDFs are generated successfully and contain note content - Note titles appear correctly in printed output - UI elements are hidden when print media is applied - PDF content matches the actual note text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements comprehensive print CSS for Nextcloud Notes to ensure clean printing without UI elements.
Changes Made
Print CSS Enhancement (
css/notes.css)Playwright Test (
playwright/e2e/print.spec.ts)Features
Print Optimization:
Quality Assurance:
Testing
The implementation includes comprehensive tests that verify:
Related Issue
Fixes #179
Screenshots
To test locally:
The print output will show a clean, professional document with only the note content, properly formatted for reading on paper.