Skip to content

DocumentConverterFromFile 1.0.0

Overview

Data Beginner

Version Source

Description

⚠️ DEPRECATED: This block is marked for removal in a future version. Use DocumentCreator block instead which provides the same functionality with better performance and additional features.

Retrieves an existing file from blob storage, converts it to a specified document format (Word, PDF, ODT, EPUB, etc.) using Pandoc, and saves the converted file back to blob storage. This legacy block supports file-only conversions with basic format detection.

Configuration Options

NameData TypeDescriptionDefault Value
output_file_typeFileTypeTarget document format for conversion. Supported formats: DOCX, PDF, ODT, EPUB, HTML, RTF, JSON, PPTX, MARKDOWN. PDF conversion uses XeLaTeX engine.FileType.DOCX

Inputs

NameData TypeDescription
fileFileInput file from blob storage to be converted. Supports common document formats including DOCX, PDF, HTML, Markdown, and other text-based formats. File content is extracted and converted to the target format.

Outputs

NameData TypeDescription
resultFileConverted file saved in blob storage with the same base name as input but different extension based on output_file_type. Contains file metadata and can be used in subsequent workflow steps.

Examples

# RECOMMENDED: Use DocumentCreator instead
- id: convert_modern
  uses: DocumentCreator@1.0.0
  with:
    output_file_type: "pdf"
    content: "Reference to input file from previous step"
  outputs:
    result: converted_file

# DEPRECATED: DocumentConverterFromFile (legacy)
- id: convert_legacy
  uses: DocumentConverterFromFile@1.0.0
  with:
    output_file_type: "pdf"
    file: "Reference to input file from previous step"
  outputs:
    result: converted_file_legacy

Error Handling

DeprecationWarning

Error Code
block_deprecated
Common Cause
Using deprecated DocumentConverterFromFile block instead of the recommended DocumentCreator block
Solution
Migrate to DocumentCreator@1.0.0 which provides the same functionality with better performance and additional features

BlobRetrievalError

Error Code
invalid_blob_data
Common Cause
Cannot retrieve file from blob storage or file data is corrupted/empty
Solution
Verify input file exists in blob storage, check file integrity, ensure proper file permissions

FormatDetectionError

Error Code
format_detection_failed
Common Cause
Cannot determine input file format from extension or content is in unsupported format
Solution
Ensure file has proper extension (.docx, .html, .md, etc.), verify file format is supported by Pandoc

FAQ

Why is this block deprecated?

DocumentConverterFromFile is being replaced by DocumentCreator which offers the same file conversion capabilities plus string input support, better performance, improved error handling, and active development. New workflows should use DocumentCreator.

How do I migrate from DocumentConverterFromFile to DocumentCreator?

Change the block name from `DocumentConverterFromFile` to `DocumentCreator`, replace the `file` input parameter with `content`, and keep the same `output_file_type` configuration. The DocumentCreator block handles both file and string inputs automatically.

What happens if I continue using this deprecated block?

The block will continue to function but may not receive bug fixes or new features. It will eventually be removed in a future version. Plan migration to DocumentCreator to ensure long-term compatibility and access to improvements.

Are there any functional differences between the blocks?

DocumentCreator provides the same core conversion functionality with additional features: string input support, enhanced file type detection, improved error handling, and better integration with modern workflow patterns. Migration should be seamless.