Adobe Portable Document Format
application/vnd.fdf
Magic Bytes
Offset: 0
25 46 44 46 2D
Forms Data Format (FDF) is a file format developed and maintained by Adobe Systems as a specialized subset of the Adobe Portable Document Format. It is primarily used to export and import data from interactive PDF forms, allowing fields to be populated without transmitting the entire document structure. While largely superseded by the XML-based XFDF standard, FDF remains supported for legacy compatibility and data exchange within Adobe Acrobat and related software applications.
Validation Code
How to validate .fdf files in Python
Python
def is_fdf(file_path: str) -> bool:
"""Check if file is a valid FDF by magic bytes."""
signature = bytes([0x25, 0x46, 0x44, 0x46, 0x2D])
with open(file_path, "rb") as f:
return f.read(5) == signature
How to validate .fdf files in Node.js
Node.js
function isFDF(buffer: Buffer): boolean {
const signature = Buffer.from([0x25, 0x46, 0x44, 0x46, 0x2D]);
return buffer.subarray(0, 5).equals(signature);
}
Go
func IsFDF(data []byte) bool {
signature := []byte{0x25, 0x46, 0x44, 0x46, 0x2D}
if len(data) < 5 {
return false
}
return bytes.Equal(data[:5], signature)
}
API Endpoint
GET
/api/v1/fdf
curl https://filesignature.org/api/v1/fdf