Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

PPTXToDocument

Convert PPTX files to documents your pipeline can query.

Key Features

  • Converts PowerPoint presentation files to text documents for indexing.
  • Configurable link format output: plain text, Markdown, or no links.
  • Optional metadata attachment to resulting documents.

Configuration

  1. Drag the PPTXToDocument component onto the canvas from the Component Library.
  2. Click on the component to open the configuration panel.
  3. Configure the component settings:
    • Set the Link Format to control how hyperlinks appear in the extracted text: none (default, text only), markdown (for [text](url)), or plain (for text (url)).
    • Set Store Full Path to control whether the full file path or just the file name is stored in document metadata.

Connections

PPTXToDocument accepts a list of file paths or ByteStream objects through its sources input. It outputs a list of Document objects.

It typically connects with:

  • FileTypeRouter: receives PPTX files routed by MIME type.
  • DocumentJoiner: sends converted documents to join with output from other converters before further processing.

Source Code

To check this component's source code, open pptx.py in the Haystack repository.

Usage Examples

Basic Configuration

  PPTXToDocument:
type: haystack.components.converters.pptx.PPTXToDocument
init_parameters:
store_full_path: false

Using the Component in an Index

In this index, PPTXToDocument receives PPTX files from FileTypeRouter and sends them to DocumentJoiner.

# haystack-pipeline
components:
FileTypeRouter:
type: haystack.components.routers.file_type_router.FileTypeRouter
init_parameters:
mime_types:
- text/plain
- application/pdf
- application/vnd.openxmlformats-officedocument.presentationml.presentation
additional_mimetypes:
TextFileToDocument:
type: haystack.components.converters.txt.TextFileToDocument
init_parameters:
encoding: utf-8
store_full_path: false
PyPDFToDocument:
type: haystack.components.converters.pypdf.PyPDFToDocument
init_parameters:
store_full_path: false
PPTXToDocument:
type: haystack.components.converters.pptx.PPTXToDocument
init_parameters:
store_full_path: false
DocumentJoiner:
type: haystack.components.joiners.document_joiner.DocumentJoiner
init_parameters:
join_mode: concatenate
weights:
top_k:
sort_by_score: true
DocumentSplitter:
type: haystack.components.preprocessors.document_splitter.DocumentSplitter
init_parameters:
split_by: word
split_length: 200
split_overlap: 0
split_threshold: 0
splitting_function:
respect_sentence_boundary: false
language: en
use_split_rules: true
extend_abbreviations: true
DocumentWriter:
type: haystack.components.writers.document_writer.DocumentWriter
init_parameters:
policy: NONE
document_store:
type: haystack_integrations.document_stores.opensearch.document_store.OpenSearchDocumentStore
init_parameters:
hosts:
index: presentation-index
max_chunk_bytes: 104857600
embedding_dim: 768
return_embedding: false
method:
mappings:
settings:
create_index: true
http_auth:
use_ssl:
verify_certs:
timeout:

connections:
- sender: FileTypeRouter.text/plain
receiver: TextFileToDocument.sources
- sender: FileTypeRouter.application/pdf
receiver: PyPDFToDocument.sources
- sender: FileTypeRouter.application/vnd.openxmlformats-officedocument.presentationml.presentation
receiver: PPTXToDocument.sources
- sender: TextFileToDocument.documents
receiver: DocumentJoiner.documents
- sender: PyPDFToDocument.documents
receiver: DocumentJoiner.documents
- sender: PPTXToDocument.documents
receiver: DocumentJoiner.documents
- sender: DocumentJoiner.documents
receiver: DocumentSplitter.documents
- sender: DocumentSplitter.documents
receiver: DocumentWriter.documents

max_runs_per_component: 100

Parameters

Inputs

ParameterTypeDefaultDescription
sourcesList[Union[str, Path, ByteStream]]List of file paths or ByteStream objects to convert.
metaOptional[Union[Dict[str, Any], List[Dict[str, Any]]]]NoneOptional metadata to attach to the Documents. This value can be either a list of dictionaries or a single dictionary. If it's a single dictionary, its content is added to the metadata of all produced Documents. If it's a list, the length of the list must match the number of sources, because the two lists will be zipped. If sources contains ByteStream objects, their meta will be added to the output Documents.

Outputs

ParameterTypeDescription
documentsList[Document]Converted documents.

Init Parameters

These are the parameters you can configure in Pipeline Builder:

ParameterTypeDefaultDescription
store_full_pathboolFalseIf True, the full path of the file is stored in the metadata of the document. If False, only the file name is stored.
link_formatLiteral['markdown', 'plain', 'none']noneThe format for link output. Options: "markdown" for [text](url), "plain" for text (url), "none" to extract only the text and ignore link addresses.

Run Method Parameters

These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.

ParameterTypeDefaultDescription
sourcesList[Union[str, Path, ByteStream]]List of file paths or ByteStream objects.
metaOptional[Union[Dict[str, Any], List[Dict[str, Any]]]]NoneOptional metadata to attach to the Documents. This value can be either a list of dictionaries or a single dictionary. If it's a single dictionary, its content is added to the metadata of all produced Documents. If it's a list, the length of the list must match the number of sources, because the two lists will be zipped. If sources contains ByteStream objects, their meta will be added to the output Documents.