Rewrite the prompt for an AI with details and clear instraction
Write a script that can add a page number to a page, and The Script should have a function to customize the page number font and color. The script should also have the functionality to set the starting page number and allow live changes in font style and color, and the position of the fate number.
Note: Position and margin will be in pt
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Here's a comprehensive, detailed prompt for creating a page numbering script with extensive customization options:
Comprehensive Page Numbering Script Development Specification
Objective
Create a versatile script that enables dynamic page number insertion with advanced customization capabilities across multiple document types.
Core Functionality Requirements
1. Page Number Placement
Support multiple document types:
PDF
Microsoft Word
Google Docs
Apple Pages
HTML/Web Documents
2. Positioning Options
Precise Positioning Controls (in Points)
Horizontal Position:
Left margin
Center
Right margin
Custom X-coordinate input
Vertical Position:
Top margin
Bottom margin
Footer area
Custom Y-coordinate input
3. Numbering Configuration
Starting Page Number
Custom start value (default: 1)
Options for different numbering styles:
Arabic numerals (1, 2, 3...)
Roman numerals (I, II, III...)
Alphabetic (A, B, C...)
4. Font Customization
Typography Controls
Font Family Selection
Standard system fonts
Web-safe fonts
Custom font upload
Font Style
Regular
Bold
Italic
Underline
Strikethrough
Font Size Range
Minimum: 6 pt
Maximum: 72 pt
Incremental steps of 0.5 pt
5. Color Customization
Comprehensive Color Options
Color Selection Methods:
Color wheel
RGB sliders
CMYK values
Hex code input
Predefined color palette
Opacity Control
0-100% transparency slider
6. Live Preview Functionality
Real-time updates without document regeneration
Instant font and color changes
Preview window showing exact page number appearance
Technical Specification
javascript
// Script Structure Outline
function initializePageNumbering() {
// Document type detection
// Initialize configuration
}
function setPageNumberPosition(x, y) {
// Position calculation logic
}
function customizeFontStyle(fontFamily, size, style) {
// Font rendering implementation
}
function setColorScheme(color, opacity) {
// Color application logic
}
function generatePageNumbers(startPage, numberingStyle) {
// Numbering generation algorithm
}
function livePreviewUpdate() {
// Real-time rendering preview
}
User Interface Design
Main Configuration Panel
Positioning Section
X-coordinate input
Y-coordinate input
Preset position buttons
Numbering Section
Start page dropdown
Numbering style selector
Prefix/suffix options
Typography Panel
Font family dropdown
Size slider
Style checkboxes
Color Configuration
Color picker
Opacity slider
Preset color palette
Preview Window
Live rendering area
Zoom and magnification options
Advanced Features
Multi-Document Support
Batch processing
Template saving
Cross-platform compatibility
Error Handling
Validation for input ranges
Graceful error messages
Automatic correction suggestions
Accessibility
High contrast mode
Screen reader compatibility
Keyboard navigation support
Performance Considerations
Minimal memory usage
Quick rendering
Low computational overhead
Efficient algorithm design
Deliverables
Complete script file
Comprehensive user manual
Installation instructions
Troubleshooting guide
Example configuration templates
Compatibility
Operating Systems:
Windows 10/11
macOS (latest 3 versions)
Linux (Ubuntu LTS)
Software Compatibility:
Microsoft Office (2019+)
Google Workspace
Adobe Acrobat
Apple iWork
Licensing and Distribution
Open-source
MIT License
GitHub repository setup
Community contribution guidelines
Testing Requirements
Unit testing for each function
Integration testing across platforms
Performance benchmarking
User acceptance testing
Accessibility compliance checks
Recommended Technologies
Primary Language: JavaScript
Frameworks: Node.js
Additional Libraries:
PDFKit
Docx-Template
html2pdf.js
Submission Guidelines:
Clean, well-commented code
Modular design
Comprehensive documentation
Version tracking
User
Add this too
The script user interface must be responsive, scaling to fit the screen. If the content exceeds the screen's dimensions, implement a dynamic scroll functionality.
Assistant
I'll integrate the responsive UI requirement into the previous specification, adding a dedicated section and technical implementation details:
Comprehensive Page Numbering Script Development Specification
[... Previous sections remain the same ...]
Responsive User Interface (UI) Design
Responsive UI Requirements
Screen Adaptation
Dynamically resize UI elements based on screen resolution
This enhanced specification provides a comprehensive approach to creating a responsive, dynamically scaling user interface for the page numbering script, with detailed technical implementation guidelines and considerations for various use cases and devices.