PFB (.pfb)
.pfb file signature | application/x-font-type1
Magic Bytes
Offset 0
80 01 FF FF 00 00 25 21 50 53 2D 41 64 6F 62 65 46 6F 6E 74
Sources: Apache Tika
All Known Signatures
2 signature variants are documented for .pfb files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 80 01 FF FF 00 00 25 21 50 53 2D 41 64 6F 62 65 46 6F 6E 74 | 0 | Apache Tika |
| 25 21 50 53 2D 41 64 6F 62 65 46 6F 6E 74 2D 31 2E 30 | 0 | Apache Tika |
Extension
.pfb
MIME Type
application/x-font-type1
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .pfb files in Python
def is_pfb(file_path: str) -> bool:
"""Check if file is a valid PFB by magic bytes."""
signature = bytes([0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x25, 0x21, 0x50, 0x53, 0x2D, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x46, 0x6F, 0x6E, 0x74])
with open(file_path, "rb") as f:
return f.read(20) == signature
How to validate .pfb files in Node.js
function isPFB(buffer: Buffer): boolean {
const signature = Buffer.from([0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x25, 0x21, 0x50, 0x53, 0x2D, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x46, 0x6F, 0x6E, 0x74]);
return buffer.subarray(0, 20).equals(signature);
}
How to validate .pfb files in Go
func IsPFB(data []byte) bool {
signature := []byte{0x80, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x25, 0x21, 0x50, 0x53, 0x2D, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x46, 0x6F, 0x6E, 0x74}
if len(data) < 20 {
return false
}
return bytes.Equal(data[:20], signature)
}
API Endpoint
/api/v1/pfb
curl https://filesignature.org/api/v1/pfb
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .pfb file?
A .pfb file is a PFB file.
What are the magic bytes for .pfb files?
The magic bytes for PFB files are 80 01 FF FF 00 00 25 21 50 53 2D 41 64 6F 62 65 46 6F 6E 74 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .pfb file?
To validate a .pfb file, read the first bytes of the file and compare them against the known magic bytes (80 01 FF FF 00 00 25 21 50 53 2D 41 64 6F 62 65 46 6F 6E 74) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .pfb files?
The primary MIME type for .pfb files is application/x-font-type1.
Is it safe to open .pfb files?
PFB (.pfb) 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.