PFM (.pfm)
.pfm file signature | application/x-font-printer-metric
Printer Font Metrics (PFM) is a legacy font-metric file format introduced by Microsoft and used by Windows to store printer-specific information for Type 1 fonts. It is used by font managers, printer drivers, and desktop publishing software to map character widths, kerning, and related metrics for accurate text rendering. The format is generally safe, but it is obsolete in modern workflows and may be encountered when working with older font packages.
Magic Bytes
Offset 0
00 01 FF FF 00 00 43 6F 70 79 72
Sources: Apache Tika
Extension
.pfm
MIME Type
application/x-font-printer-metric
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .pfm files in Python
def is_pfm(file_path: str) -> bool:
"""Check if file is a valid PFM by magic bytes."""
signature = bytes([0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x43, 0x6F, 0x70, 0x79, 0x72])
with open(file_path, "rb") as f:
return f.read(11) == signature
How to validate .pfm files in Node.js
function isPFM(buffer: Buffer): boolean {
const signature = Buffer.from([0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x43, 0x6F, 0x70, 0x79, 0x72]);
return buffer.subarray(0, 11).equals(signature);
}
How to validate .pfm files in Go
func IsPFM(data []byte) bool {
signature := []byte{0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x43, 0x6F, 0x70, 0x79, 0x72}
if len(data) < 11 {
return false
}
return bytes.Equal(data[:11], signature)
}
API Endpoint
/api/v1/pfm
curl https://filesignature.org/api/v1/pfm
See the full API documentation for all endpoints and parameters.
Related Formats
Frequently Asked Questions
What is a .pfm file?
A .pfm file is identified by the magic bytes 00 01 FF FF 00 00 43 6F 70 79 72 at byte offset 0. Printer Font Metrics (PFM) is a legacy font-metric file format introduced by Microsoft and used by Windows to store printer-specific information for Type 1 fonts. It is used by font managers, printer drivers, and desktop publishing software to map character widths, kerning, and related metrics for accurate text rendering. The format is generally safe, but it is obsolete in modern workflows and may be encountered when working with older font packages.
What are the magic bytes for .pfm files?
The magic bytes for PFM files are 00 01 FF FF 00 00 43 6F 70 79 72 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .pfm file?
To validate a .pfm file, read the first bytes of the file and compare them against the known magic bytes (00 01 FF FF 00 00 43 6F 70 79 72) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .pfm files?
The primary MIME type for .pfm files is application/x-font-printer-metric.
Is it safe to open .pfm files?
PFM (.pfm) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.