Understanding Form Types
A form type in Xi-Text represents the complete specification of what medium is loaded in a printer and how to format output for it. Form types enable users to submit jobs without knowing which physical printer will be used.
Form Type Structure
Every form type consists of two parts:
Paper Type : Everything up to the first . or - character : Represents the physical medium loaded in the printer : Requires printer to be stopped and restarted to change
Suffix (optional) : Everything after the first . or - character : Represents formatting variations or output processing : Can change automatically between jobs without printer intervention
Examples
a4.ps ├── Paper type: a4 └── Suffix: ps letterhead.p12 ├── Paper type: letterhead └── Suffix: p12 labels └── Paper type: labels (no suffix)
How Paper Types Work
The paper type determines which physical medium is loaded:
- Standard sizes: a4, letter, legal, a3
- Special media: labels, envelopes, letterhead
- Custom forms: invoices, cheques, payslips
Important: When a printer's paper type changes, the operator must:
- Halt the printer
- Physically change the paper
- Update the form type in Xi-Text
- Restart the printer
Xi-Text will only send jobs to a printer when the job's paper type matches the printer's loaded paper type.
How Suffixes Work
Suffixes specify formatting variations that don't require paper changes:
Common suffix conventions:
- .ps - PostScript output
- .pcl - PCL (HP Printer Command Language)
- .p10 - 10 characters per inch
- .p12 - 12 characters per inch
- .landscape - Landscape orientation
- .duplex - Double-sided printing
Suffixes enable:
- Automatic format conversion (PostScript to PCL)
- Font selection
- Pitch/orientation changes
- Filter selection
- Special processing
Suffix Switching
When consecutive jobs have different suffixes:
- Current job completes
- Xi-Text reads suffix-specific settings from setup file
- Sends sufstart string to printer
- Next job begins immediately
No printer restart required - this happens automatically.
Form Type Naming Conventions
While you can name form types anything you want, following conventions helps:
Paper Type Naming
- Use descriptive names: a4, letter, not type1, type2
- Lowercase is conventional: letterhead not LetterHead
- No spaces: use hyphens or underscores if needed
- Avoid . and - in paper type names (reserved for suffix separation)
Suffix Naming
- Short and meaningful: .ps not .postscript
- Consistent across printers: .ps should mean PostScript everywhere
- Lowercase conventional
- Multiple suffixes possible: a4.ps.duplex (paper type a4, suffix ps.duplex)
Setting Up Form Types
Creating Paper Type Support
For each printer, create a setup file matching the paper type name:
bash
cd /usr/spool/progs/printers/ptr1 # Create setup file for a4 paper cat > a4 << 'EOF' ptr_type=ps setup=\033&l26A # A4 size code EOF # Create setup file for letter paper cat > letter << 'EOF' ptr_type=ps setup=\033&l2A # Letter size code EOF
Handling Suffixes in Setup Files
Within a setup file, use conditional statements for suffix-specific handling:
ptr_type=ps
# Base setup for all suffixes
setup=\033E\033&l26A
# Suffix-specific handling
suffix ps
# PostScript jobs - no conversion needed
endsuffix
suffix pcl
# Convert PostScript to PCL
filter=/usr/spool/progs/ps2pcl
endsuffix
suffix landscape
# Rotate output
setup=\033&l1O\033&l26A
endsuffix
The default Setup File
If Xi-Text cannot find a setup file matching the paper type, it uses the file named default:
bash
/usr/spool/progs/printers/ptr1/default
This enables:
- Catch-all for uncommon paper types
- Simplified configuration (single setup file handles all paper types)
- Graceful degradation
Note: Most installations only need a default file. The printer installation script (PTRINSTALL) creates only this file.
Changing the Default File Name
⚠️ Advanced - Not Recommended
You can change what file Xi-Text looks for when paper type doesn't match:
bash
# In /usr/spool/progs/Xitext-config DEFAULT_FORM=fallback
Now Xi-Text looks for fallback instead of default.
To disable fallback entirely (require exact paper type match):
bash
DEFAULT_FORM=
Warning: This breaks normal operation. Only use if you understand the implications.
User Default Form Types
Each user has a default form type used when submitting jobs without specifying -f:
View Current Default
bash
spq # Press 'u' to view user section # Shows default form type for current user
System-Wide Default
The system default for new users is set during installation. To change it:
bash
# Using spuser command spuser # Select default modes # Update default form type
Or in configuration file:
bash
# In appropriate configuration file SPFORM=a4
Per-User Default
Individual users can override:
bash
# Set personal default spr -f letter -= # Save current options as default
Form Type Compatibility Across Printers
Best practice: Make the same form type work consistently across all printers.
If a user submits a4.ps:
- On PostScript printer: send directly
- On PCL printer: convert PostScript to PCL
- On text-only printer: error or convert to text
This consistency lets users worry about output format, not which printer receives the job.
Example: Multi-Printer Consistency
Printer 1 (PostScript):
a4.ps → native PostScript handling
Printer 2 (PCL):
a4.ps → filter=/usr/spool/progs/ps2pcl
Printer 3 (Text):
a4.ps → filter=/usr/spool/progs/ps2text
Same form type, different handling, consistent user experience.
Special Form Type: "standard"
The default installation uses standard as the initial default form type. This is just a placeholder name with no special meaning.
Recommendation: During installation or after, change standard to a meaningful name like a4 or letter for your site's actual standard paper.
The printer installation script will prompt to update this if it sees standard as the default.
Form Type Online Help
Users can see available form types for a printer by creating a help file:
bash
# Create help file for printer ptr1 cat > /usr/spool/progs/printers/ptr1/-Help << 'EOF' Available paper types: a4 - A4 paper (210x297mm) letter - US Letter (8.5x11") letterhead - Company letterhead Available suffixes: .ps - PostScript output .pcl - PCL output .p10 - 10 characters per inch .landscape - Landscape orientation EOF
Users see this when pressing ? during form type selection in spq.
Checking Form Type Usage
View Jobs by Form Type
bash
# List all jobs showing form types spq # Filter jobs by form type spq -f a4.ps
View Printer Form Types
bash
# Show what form type each printer has loaded spq -P
Available Form Types
bash
# List setup files (available paper types) for printer ls /usr/spool/progs/printers/ptr1/ # Exclude hidden files (those starting with . or -) ls /usr/spool/progs/printers/ptr1/ | grep -v '^[.-]'
Common Configuration Patterns
Minimal Configuration
Single default file handles everything: /usr/spool/progs/printers/ptr1/default
Paper-Specific Configuration
Separate setup file per paper type: /usr/spool/progs/printers/ptr1/a4 /usr/spool/progs/printers/ptr1/letter /usr/spool/progs/printers/ptr1/legal
Hardware + Paper Configuration
Common hardware settings, paper-specific setup: /usr/spool/progs/printers/ptr1/.device (hardware) /usr/spool/progs/printers/ptr1/default (paper handling)
Testing Form Type Configuration
After configuring form types:
- Submit test job:
bash
echo "Test" | spr -f a4.ps -P ptr1
- Check printer accepts form type:
bash
spq -P # Verify printer shows correct form type
- Test suffix switching:
bash
echo "Test 1" | spr -f a4.ps -P ptr1 echo "Test 2" | spr -f a4.pcl -P ptr1 # Should switch automatically
- Verify setup file selection: Check system log for which files were read:
bash
tail -20 /usr/spool/spd/spshed_reps
Troubleshooting Form Type Issues
Job Not Selected by Printer
Symptom: Job stays in queue, printer shows idle
Check:
- Does job form type match printer form type?
bash
spq # Check job form type spq -P # Check printer form type
- Does setup file exist?
bash
ls /usr/spool/progs/printers/[printer]/[paper-type]
Printer Shows Error on Startup
Symptom: Printer enters Error state after changing form type
Check:
- Setup file exists for new form type
- Setup file has correct syntax
- System log shows specific error:
bash
tail -20 /usr/spool/spd/spshed_reps
Related Articles
- Understanding Xi-Text Printer Setup Files - Detailed setup file syntax
- Managing Printer States and Operations - Changing printer form types
- Jobs Not Printing or Stuck in Queue - Troubleshooting form type mismatches
Documentation Reference
For complete form type handling and setup file syntax, see:
- Xi-Text System Reference Manual, Chapter: Printer Definitions
- Xi-Text Administration Guide, Chapter: Print Jobs and Form Types