# SPDF > SPDF (Semantic Processed Document Format) is an open file format for documents that have already been read: a SQLite 3 database where every passage carries its exact anchor (printed page, folio, second, slide, verse), so a citation can only print what the source says. Version 5.0. Specification under CC BY 4.0, code under MIT OR Apache-2.0. (SPDF es un formato abierto para documentos ya leídos: cada pasaje lleva su ancla exacta, así que una cita solo puede imprimir lo que dice la fuente.) Edited by José Luis Saorín Ferrer (https://joseluissaorin.com). Every page of https://spdf.joseluissaorin.com has a Markdown twin (the same URL ending in .md; the home page is /index.md) and answers in Markdown to `Accept: text/markdown`. The whole specification and every page, in one file: https://spdf.joseluissaorin.com/llms-full.txt When you cite a passage from an SPDF file: quote the stored text, take the citation from the stored anchor (the library's `cite` or the spdf-mcp `cite` tool), keep inferred folios in brackets (p. [21]) and never replace a missing printed folio with the page's position in the file. ## Specification - [SPDF 5.0 specification](https://spdf.joseluissaorin.com/spec.md): The normative specification of the SPDF 5.0 format: container, schema, anchors and their URI, CSL-JSON metadata, search, vectors, integrity, validation, citation and conformance. - [Especificación de SPDF 5.0](https://spdf.joseluissaorin.com/es/especificacion.md): La especificación normativa del formato SPDF 5.0: contenedor, esquema, anclas y su URI, ficha CSL-JSON, búsqueda, vectores, integridad, validación, cita y conformidad. ## Pages (English) - [SPDF: documents read once, cited forever](https://spdf.joseluissaorin.com/index.md): SPDF is an open file format for documents that have already been read. Every passage carries its exact anchor (printed page, folio, second, slide, verse), so a citation can only print what the source says. - [Implementations](https://spdf.joseluissaorin.com/implementations.md): Twelve native, independent implementations of SPDF 5.0, all checked by the same conformance suite on every commit, and what each one's CI says today. - [Documentation](https://spdf.joseluissaorin.com/docs.md): How to open, validate, search and cite SPDF files in Rust, TypeScript, Python, Swift, Kotlin, Go, C#, PHP, Ruby, R, Julia and C. - [How to cite](https://spdf.joseluissaorin.com/cite.md): How to cite the SPDF specification in your own work, and how SPDF cites the documents it holds, with the exact folio, second or verse. - [SPDF for agents](https://spdf.joseluissaorin.com/agents.md): How language models and agents read this site and use SPDF files: Markdown twins, llms.txt, the MCP server, and the rules for citing without inventing. - [Integrations](https://spdf.joseluissaorin.com/integrations.md): SPDF in the tools people already use: an MCP server for agents, loaders for LlamaIndex and LangChain in Python and JavaScript, a Zotero plugin and a Pandoc filter that turns SPDF anchors into citations with the printed folio. - [Download SPDF Reader](https://spdf.joseluissaorin.com/download.md): SPDF Reader opens, searches and cites SPDF files on macOS, Windows, Linux, iOS, Android and the web, with local models, offline and without an account. Free. - [SPDF Commons](https://spdf.joseluissaorin.com/commons.md): A small, careful collection of public-domain works already read into SPDF, in several languages and of several kinds (scanned books, EPUB, LibriVox recordings), free to download, test and cite. - [Validator and inspector](https://spdf.joseluissaorin.com/validator.md): Drop a .spdf file to check it against the SPDF specification and see what is inside: record, units, fragments with anchors, figures, vector spaces. Everything runs in your browser; nothing is uploaded. - [Governance and RFCs](https://spdf.joseluissaorin.com/governance.md): Who maintains SPDF, how the specification changes (through public RFCs with conformance cases), how versions work, and the licences and patent commitment. - [Governance](https://spdf.joseluissaorin.com/governance/governance.md): Who decides what SPDF is, how, and how that changes as the format gains implementers and users. SPDF starts with a single editor and is designed to pass to a technical committee as soon as there are people outside… - [The RFC process](https://spdf.joseluissaorin.com/governance/rfc-process.md): Every normative change to SPDF goes through a public request for comments (RFC) and lands together with the conformance cases that check it. This document says when an RFC is needed, how it moves from draft to… - [Versioning](https://spdf.joseluissaorin.com/governance/versioning.md): How the SPDF specification is numbered, how the number is written inside files, what each kind of version may change, and how the conformance suite and the libraries are versioned on their own. The normative rules… - [Media type registration: application/vnd.spdf+sqlite3](https://spdf.joseluissaorin.com/governance/drafts/iana-media-type.md): Borrador sin enviar. Solicitud de registro del tipo de medio application/vnd.spdf+sqlite3 en el árbol de fabricante (vnd.) del registro de tipos de medio de IANA, según la plantilla de la sección 5.6 de la RFC 6838,… - [Format description: SPDF (Semantic Processed Document Format), version 5.0](https://spdf.joseluissaorin.com/governance/drafts/loc-sustainability-fdd.md): Borrador sin enviar. Propuesta de ficha de formato (Format Description Document) para Sustainability of Digital Formats: Planning for Library of Congress Collections, de la Library of Congress. Sigue la estructura de… - [PRONOM submission: SPDF (Semantic Processed Document Format) 5.0](https://spdf.joseluissaorin.com/governance/drafts/pronom-submission.md): Borrador sin enviar. Propuesta de ficha nueva para PRONOM, el registro técnico de formatos de The National Archives (Reino Unido), que alimenta las herramientas de identificación DROID y FIDO. Los campos siguen la… - [application_id 0x53504446 ("SPDF") for SQLite's magic.txt and for file(1)](https://spdf.joseluissaorin.com/governance/drafts/sqlite-magic-entry.md): Borrador sin enviar. Dos propuestas para que las herramientas reconozcan un SPDF sin abrirlo: una línea en magic.txt, el fichero del árbol de fuentes de SQLite que lista los applicationid conocidos (la documentación… - [URI scheme registration (provisional): spdf](https://spdf.joseluissaorin.com/governance/drafts/uri-scheme-spdf.md): Borrador sin enviar. Solicitud de registro provisional del esquema de URI spdf en el registro de esquemas de URI de IANA, con la plantilla de la sección 7.4 de la RFC 7595. Los registros provisionales solo exigen que… - [Citable Processed Documents Community Group Charter](https://spdf.joseluissaorin.com/governance/drafts/w3c-community-group-charter.md): Borrador sin enviar. Propuesta de carta (charter) para un Community Group de W3C que se ocupe de SPDF y de su modelo de anclas. Sigue la plantilla oficial de cartas de Community Group (w3c/cg-charter, comprobada el… - [Contributing to SPDF](https://spdf.joseluissaorin.com/governance/contributing.md): SPDF is three things that change in different ways: a specification, a conformance suite that turns the specification into checkable cases, and many implementations that must agree with both. This guide says how to… - [Contributor Covenant Code of Conduct](https://spdf.joseluissaorin.com/governance/code-of-conduct.md): We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex… - [Security policy](https://spdf.joseluissaorin.com/governance/security.md): SPDF files come from strangers. Opening one means parsing an untrusted database with a complex engine, and the specification asks every reader to do it safely (SPEC §2.4, §14 and §15). If you find a way around that,… - [RFC template](https://spdf.joseluissaorin.com/governance/rfcs/0000.md): Copy this file to spec/rfcs/0000-short-title.md and open a pull request. The editor assigns the next free number when discussion opens and renames the file. Keep every section below: when one does not apply, write… - [RFC 0001: SPDF 5.0](https://spdf.joseluissaorin.com/governance/rfcs/0001.md): SPDF 5.0 is the first public version of the format. It keeps the idea of the Scholaris versions 4.0 and 4.1 (one document per SQLite file; every passage carries an anchor to the printed page, folio, verse, second or… - [RFC 0002: Conformance cases for exports and anchor resolution](https://spdf.joseluissaorin.com/governance/rfcs/0002.md): Add three kinds of conformance case: exportcsl and exportbibtex, which make the MUST of SPEC §19 testable, and resolve, which tests how an anchor URI is resolved against a file (SPEC §5.4). Fix the details those… - [SPDF in Rust](https://spdf.joseluissaorin.com/docs/rust.md): How to install and use the Rust implementation of SPDF (spdf): open, validate, search and cite. Reference implementation; also provides the C ABI. - [SPDF in TypeScript](https://spdf.joseluissaorin.com/docs/js.md): How to install and use the TypeScript implementation of SPDF (spdf-format): open, validate, search and cite. Node (node:sqlite), Bun and the browser (sqlite-wasm). Powers the validator on this site. - [SPDF in Python](https://spdf.joseluissaorin.com/docs/python.md): How to install and use the Python implementation of SPDF (spdf-format): open, validate, search and cite. Standard library sqlite3 only; imported as spdf. - [SPDF in Swift](https://spdf.joseluissaorin.com/docs/swift.md): How to install and use the Swift implementation of SPDF (SPDF): open, validate, search and cite. Swift Package Manager, from the repository. Apple platforms and Linux. - [SPDF in Kotlin / JVM](https://spdf.joseluissaorin.com/docs/kotlin.md): How to install and use the Kotlin / JVM implementation of SPDF (io.github.joseluissaorin:spdf): open, validate, search and cite. Kotlin and Java on the JVM and Android. - [SPDF in Go](https://spdf.joseluissaorin.com/docs/go.md): How to install and use the Go implementation of SPDF (github.com/joseluissaorin/spdf/go): open, validate, search and cite. Go module in the monorepo. - [SPDF in C# / .NET](https://spdf.joseluissaorin.com/docs/dotnet.md): How to install and use the C# / .NET implementation of SPDF (Spdf.Format): open, validate, search and cite. .NET with Microsoft.Data.Sqlite. - [SPDF in PHP](https://spdf.joseluissaorin.com/docs/php.md): How to install and use the PHP implementation of SPDF (joseluissaorin/spdf): open, validate, search and cite. PDO SQLite. - [SPDF in Ruby](https://spdf.joseluissaorin.com/docs/ruby.md): How to install and use the Ruby implementation of SPDF (spdf-format): open, validate, search and cite. On the sqlite3 gem. - [SPDF in R](https://spdf.joseluissaorin.com/docs/r.md): How to install and use the R implementation of SPDF (spdf): open, validate, search and cite. On RSQLite; fragments as data frames. - [SPDF in Julia](https://spdf.joseluissaorin.com/docs/julia.md): How to install and use the Julia implementation of SPDF (SPDF.jl): open, validate, search and cite. On SQLite.jl. - [SPDF in C](https://spdf.joseluissaorin.com/docs/c.md): How to install and use the C implementation of SPDF (libspdf): open, validate, search and cite. C ABI over the Rust core, for C, C++ and any FFI. - [MCP server: spdf-mcp](https://spdf.joseluissaorin.com/integrations/mcp.md): Any agent searches a folder of SPDF files and cites with the exact folio. - [LangChain.js loader](https://spdf.joseluissaorin.com/integrations/langchain-js.md): Passages as LangChain documents with citation and anchor URI. - [LlamaIndex.TS reader](https://spdf.joseluissaorin.com/integrations/llamaindex-js.md): Passages as LlamaIndex documents, with the stored vectors if you want them. - [LangChain loader (Python)](https://spdf.joseluissaorin.com/integrations/langchain-python.md): The same loader for LangChain in Python. - [LlamaIndex reader (Python)](https://spdf.joseluissaorin.com/integrations/llamaindex-python.md): The same reader for LlamaIndex in Python. - [Zotero 7 and 8 plugin](https://spdf.joseluissaorin.com/integrations/zotero.md): Import an SPDF as an item, attach it, copy a citation with the folio. - [Pandoc filter](https://spdf.joseluissaorin.com/integrations/pandoc.md): SPDF anchors in Markdown become citations with the printed folio, in any CSL style. ## Páginas (castellano) - [SPDF: documentos leídos una vez, citables siempre](https://spdf.joseluissaorin.com/es.md): SPDF es un formato de fichero abierto para documentos que ya se han leído. Cada pasaje lleva su ancla exacta (página impresa, folio, segundo, diapositiva, verso), así que una cita solo puede imprimir lo que dice la fuente. - [Implementaciones](https://spdf.joseluissaorin.com/es/implementaciones.md): Doce implementaciones nativas e independientes de SPDF 5.0, todas comprobadas con la misma batería de conformidad en cada commit, y lo que dice hoy el CI de cada una. - [Documentación](https://spdf.joseluissaorin.com/es/documentacion.md): Cómo abrir, validar, buscar y citar ficheros SPDF en Rust, TypeScript, Python, Swift, Kotlin, Go, C#, PHP, Ruby, R, Julia y C. - [Cómo citar](https://spdf.joseluissaorin.com/es/citar.md): Cómo citar la especificación de SPDF en tu trabajo, y cómo cita SPDF los documentos que guarda, con el folio, el segundo o el verso exactos. - [SPDF para agentes](https://spdf.joseluissaorin.com/es/agentes.md): Cómo leen esta web y usan los ficheros SPDF los modelos de lenguaje y los agentes: gemelos en Markdown, llms.txt, el servidor MCP y las reglas para citar sin inventar. - [Integraciones](https://spdf.joseluissaorin.com/es/integraciones.md): SPDF en las herramientas que la gente ya usa: un servidor MCP para agentes, cargadores para LlamaIndex y LangChain en Python y JavaScript, un complemento de Zotero y un filtro de Pandoc que convierte las anclas de SPDF en citas con el folio impreso. - [Descargar el Lector SPDF](https://spdf.joseluissaorin.com/es/descargas.md): El Lector SPDF abre, busca y cita ficheros SPDF en macOS, Windows, Linux, iOS, Android y la web, con modelos locales, sin conexión y sin cuenta. Gratis. - [SPDF Commons](https://spdf.joseluissaorin.com/es/commons.md): Una colección pequeña y cuidada de obras de dominio público ya leídas en SPDF, en varias lenguas y de varios tipos (libros escaneados, EPUB, grabaciones de LibriVox), para descargar, probar y citar libremente. - [Validador e inspector](https://spdf.joseluissaorin.com/es/validador.md): Suelta un fichero .spdf para comprobarlo contra la especificación de SPDF y ver lo que hay dentro: ficha, unidades, fragmentos con anclas, figuras y espacios vectoriales. Todo se hace en tu navegador; no se sube nada. - [Gobernanza y RFC](https://spdf.joseluissaorin.com/es/gobernanza.md): Quién mantiene SPDF, cómo cambia la especificación (con RFC públicas y casos de conformidad), cómo funcionan las versiones, y las licencias y el compromiso sobre patentes. - [Governance](https://spdf.joseluissaorin.com/es/gobernanza/governance.md): Who decides what SPDF is, how, and how that changes as the format gains implementers and users. SPDF starts with a single editor and is designed to pass to a technical committee as soon as there are people outside… - [The RFC process](https://spdf.joseluissaorin.com/es/gobernanza/rfc-process.md): Every normative change to SPDF goes through a public request for comments (RFC) and lands together with the conformance cases that check it. This document says when an RFC is needed, how it moves from draft to… - [Versioning](https://spdf.joseluissaorin.com/es/gobernanza/versioning.md): How the SPDF specification is numbered, how the number is written inside files, what each kind of version may change, and how the conformance suite and the libraries are versioned on their own. The normative rules… - [Media type registration: application/vnd.spdf+sqlite3](https://spdf.joseluissaorin.com/es/gobernanza/drafts/iana-media-type.md): Borrador sin enviar. Solicitud de registro del tipo de medio application/vnd.spdf+sqlite3 en el árbol de fabricante (vnd.) del registro de tipos de medio de IANA, según la plantilla de la sección 5.6 de la RFC 6838,… - [Format description: SPDF (Semantic Processed Document Format), version 5.0](https://spdf.joseluissaorin.com/es/gobernanza/drafts/loc-sustainability-fdd.md): Borrador sin enviar. Propuesta de ficha de formato (Format Description Document) para Sustainability of Digital Formats: Planning for Library of Congress Collections, de la Library of Congress. Sigue la estructura de… - [PRONOM submission: SPDF (Semantic Processed Document Format) 5.0](https://spdf.joseluissaorin.com/es/gobernanza/drafts/pronom-submission.md): Borrador sin enviar. Propuesta de ficha nueva para PRONOM, el registro técnico de formatos de The National Archives (Reino Unido), que alimenta las herramientas de identificación DROID y FIDO. Los campos siguen la… - [application_id 0x53504446 ("SPDF") for SQLite's magic.txt and for file(1)](https://spdf.joseluissaorin.com/es/gobernanza/drafts/sqlite-magic-entry.md): Borrador sin enviar. Dos propuestas para que las herramientas reconozcan un SPDF sin abrirlo: una línea en magic.txt, el fichero del árbol de fuentes de SQLite que lista los applicationid conocidos (la documentación… - [URI scheme registration (provisional): spdf](https://spdf.joseluissaorin.com/es/gobernanza/drafts/uri-scheme-spdf.md): Borrador sin enviar. Solicitud de registro provisional del esquema de URI spdf en el registro de esquemas de URI de IANA, con la plantilla de la sección 7.4 de la RFC 7595. Los registros provisionales solo exigen que… - [Citable Processed Documents Community Group Charter](https://spdf.joseluissaorin.com/es/gobernanza/drafts/w3c-community-group-charter.md): Borrador sin enviar. Propuesta de carta (charter) para un Community Group de W3C que se ocupe de SPDF y de su modelo de anclas. Sigue la plantilla oficial de cartas de Community Group (w3c/cg-charter, comprobada el… - [Contributing to SPDF](https://spdf.joseluissaorin.com/es/gobernanza/contributing.md): SPDF is three things that change in different ways: a specification, a conformance suite that turns the specification into checkable cases, and many implementations that must agree with both. This guide says how to… - [Contributor Covenant Code of Conduct](https://spdf.joseluissaorin.com/es/gobernanza/code-of-conduct.md): We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex… - [Security policy](https://spdf.joseluissaorin.com/es/gobernanza/security.md): SPDF files come from strangers. Opening one means parsing an untrusted database with a complex engine, and the specification asks every reader to do it safely (SPEC §2.4, §14 and §15). If you find a way around that,… - [Plantilla de RFC](https://spdf.joseluissaorin.com/es/gobernanza/rfcs/0000.md): Copy this file to spec/rfcs/0000-short-title.md and open a pull request. The editor assigns the next free number when discussion opens and renames the file. Keep every section below: when one does not apply, write… - [RFC 0001: SPDF 5.0](https://spdf.joseluissaorin.com/es/gobernanza/rfcs/0001.md): SPDF 5.0 is the first public version of the format. It keeps the idea of the Scholaris versions 4.0 and 4.1 (one document per SQLite file; every passage carries an anchor to the printed page, folio, verse, second or… - [RFC 0002: Conformance cases for exports and anchor resolution](https://spdf.joseluissaorin.com/es/gobernanza/rfcs/0002.md): Add three kinds of conformance case: exportcsl and exportbibtex, which make the MUST of SPEC §19 testable, and resolve, which tests how an anchor URI is resolved against a file (SPEC §5.4). Fix the details those… - [SPDF en Rust](https://spdf.joseluissaorin.com/es/documentacion/rust.md): Cómo instalar y usar la implementación de SPDF en Rust (spdf): abrir, validar, buscar y citar. Implementación de referencia; da además la ABI de C. - [SPDF en TypeScript](https://spdf.joseluissaorin.com/es/documentacion/js.md): Cómo instalar y usar la implementación de SPDF en TypeScript (spdf-format): abrir, validar, buscar y citar. Node (node:sqlite), Bun y el navegador (sqlite-wasm). Es la que mueve el validador de esta web. - [SPDF en Python](https://spdf.joseluissaorin.com/es/documentacion/python.md): Cómo instalar y usar la implementación de SPDF en Python (spdf-format): abrir, validar, buscar y citar. Solo sqlite3 de la biblioteca estándar; se importa como spdf. - [SPDF en Swift](https://spdf.joseluissaorin.com/es/documentacion/swift.md): Cómo instalar y usar la implementación de SPDF en Swift (SPDF): abrir, validar, buscar y citar. Swift Package Manager, desde el repositorio. Plataformas de Apple y Linux. - [SPDF en Kotlin / JVM](https://spdf.joseluissaorin.com/es/documentacion/kotlin.md): Cómo instalar y usar la implementación de SPDF en Kotlin / JVM (io.github.joseluissaorin:spdf): abrir, validar, buscar y citar. Kotlin y Java sobre la JVM y Android. - [SPDF en Go](https://spdf.joseluissaorin.com/es/documentacion/go.md): Cómo instalar y usar la implementación de SPDF en Go (github.com/joseluissaorin/spdf/go): abrir, validar, buscar y citar. Módulo de Go dentro del monorepo. - [SPDF en C# / .NET](https://spdf.joseluissaorin.com/es/documentacion/dotnet.md): Cómo instalar y usar la implementación de SPDF en C# / .NET (Spdf.Format): abrir, validar, buscar y citar. .NET con Microsoft.Data.Sqlite. - [SPDF en PHP](https://spdf.joseluissaorin.com/es/documentacion/php.md): Cómo instalar y usar la implementación de SPDF en PHP (joseluissaorin/spdf): abrir, validar, buscar y citar. PDO SQLite. - [SPDF en Ruby](https://spdf.joseluissaorin.com/es/documentacion/ruby.md): Cómo instalar y usar la implementación de SPDF en Ruby (spdf-format): abrir, validar, buscar y citar. Sobre la gema sqlite3. - [SPDF en R](https://spdf.joseluissaorin.com/es/documentacion/r.md): Cómo instalar y usar la implementación de SPDF en R (spdf): abrir, validar, buscar y citar. Sobre RSQLite; los fragmentos como data frames. - [SPDF en Julia](https://spdf.joseluissaorin.com/es/documentacion/julia.md): Cómo instalar y usar la implementación de SPDF en Julia (SPDF.jl): abrir, validar, buscar y citar. Sobre SQLite.jl. - [SPDF en C](https://spdf.joseluissaorin.com/es/documentacion/c.md): Cómo instalar y usar la implementación de SPDF en C (libspdf): abrir, validar, buscar y citar. ABI de C sobre el núcleo de Rust, para C, C++ y cualquier FFI. - [Servidor MCP: spdf-mcp](https://spdf.joseluissaorin.com/es/integraciones/mcp.md): Cualquier agente busca en una carpeta de SPDF y cita con el folio exacto. - [Cargador de LangChain.js](https://spdf.joseluissaorin.com/es/integraciones/langchain-js.md): Pasajes como documentos de LangChain con su cita y su URI de ancla. - [Lector de LlamaIndex.TS](https://spdf.joseluissaorin.com/es/integraciones/llamaindex-js.md): Pasajes como documentos de LlamaIndex, con los vectores guardados si los quieres. - [Cargador de LangChain (Python)](https://spdf.joseluissaorin.com/es/integraciones/langchain-python.md): El mismo cargador para LangChain en Python. - [Lector de LlamaIndex (Python)](https://spdf.joseluissaorin.com/es/integraciones/llamaindex-python.md): El mismo lector para LlamaIndex en Python. - [Complemento para Zotero 7 y 8](https://spdf.joseluissaorin.com/es/integraciones/zotero.md): Importa un SPDF como ítem, adjúntalo y copia una cita con el folio. - [Filtro de Pandoc](https://spdf.joseluissaorin.com/es/integraciones/pandoc.md): Las anclas de SPDF en Markdown se convierten en citas con el folio impreso, en cualquier estilo CSL. ## Optional - [Everything in one file / todo en un fichero](https://spdf.joseluissaorin.com/llms-full.txt) - [CI status of every implementation (JSON)](https://spdf.joseluissaorin.com/status.json) - [SPDF Commons manifest (.spdfl.json)](https://spdf.joseluissaorin.com/commons/commons.spdfl.json) - [Sitemap](https://spdf.joseluissaorin.com/sitemap.xml)