Printer Firmware Auto-Detects Source Code for Syntax Highlighting

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional printers lack the ability to automatically apply color syntax highlighting to source code files when printing, resulting in plain black text output despite display highlighting, making printed code less readable.

Innovation Solution

A printing device firmware that analyzes plain text content to determine if it is source code or markup language and formats it using a stored template, applying color syntax highlighting if available, to produce a more readable output.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If conventional printers use factory default settings for printing, then the device operation is simple and reliable, but the printed source code lacks color syntax highlighting and readability

Engineering Contradiction:
Improvedevice operation simplicityVSAvoidprint output quality
Core Design Contradiction:
Ease of operationVSManufacturing precision

Solution Approach 1:

The printing device automatically detects whether the input text is source code and applies appropriate formatting templates without requiring user configuration. The system analyzes the text content itself to determine if it is source code and selectively applies color syntax highlighting, making the device self-sufficient and eliminating the need for manual setup while improving output quality.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system changes the printing parameters (color, font, formatting) based on the detected text type. When source code is detected, the printer switches from default black text to colored syntax highlighting using stored templates, thereby improving readability without requiring the user to manually change settings.

Inventive Principle:
Principle #35Parameter changes

2Manufacturing precision

If the printer analyzes plain text content to detect source code, then color syntax highlighting can be applied to improve readability, but the processing time and device complexity increase

Engineering Contradiction:
Improveprint output qualityVSAvoidfirmware processing complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The printer performs partial analysis of the text content by examining specific characteristics (such as code structure, syntax patterns) to determine if it is source code, rather than performing exhaustive analysis. This selective approach enables the system to apply color syntax highlighting when needed while avoiding unnecessary processing overhead and maintaining reasonable device complexity.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The printing device stores multiple formatting templates in advance for different types of source code. When source code is detected, the system quickly matches the text to a pre-prepared template and applies the formatting, eliminating the need for complex real-time formatting calculations and reducing processing complexity.

Inventive Principle:
Principle #10Preliminary action

3Manufacturing precision

If the printer applies color syntax highlighting to source code, then readability is enhanced, but the device must store and process multiple formatting templates

Engineering Contradiction:
Improveprint output qualityVSAvoidstored template data
Core Design Contradiction:
Manufacturing precisionVSQuantity of substance

Solution Approach 1:

The printing device uses universal formatting templates that can apply to multiple types of source code languages. Instead of storing separate templates for each programming language, the system employs general-purpose templates with color schemes that work across different code types, thereby reducing the total amount of stored template data while still providing color syntax highlighting for various source code formats.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS11681483B2Built-in print formatting responsive to content
Publication Date: 2023.06.20 KYOCERA DOCUMENT SOLUTIONS INC
  • US11681483B2 patent drawing
  • US11681483B2 patent drawing
  • US11681483B2 patent drawing

AI summary

Systems and methods relate generally to a printing device are disclosed. In an example method thereof, a print job having plain text is received by the printing device. Content of the plain text in the print job is analyzed. The plain text is determined to be for a source code responsive to the analyzing. The plain text is formatted responsive to a template stored for the source code. In another example, a markup language rather than source code is used.