Developer's Guide

HTML Converter

Comprehensive guide to Sheetize HTML Converter's PDF to HTML and HTML to PDF features.

Image Converter

Comprehensive guide to Sheetize Image Converter's features for converting documents to and from image formats.

eBook Converter

Comprehensive guide to Sheetize eBook Converter for converting documents between various eBook formats.

JSON Converter

Comprehensive guide to Sheetize JSON Converter's document to JSON and JSON to document features.

PDF Converter

Comprehensive guide to Sheetize PDF Converter for document conversion to and from PDF.

Spreadsheet Converter

Comprehensive guide to Sheetize Spreadsheet Converter for converting spreadsheet documents to and from various formats.

Spreadsheet Merger

Comprehensive guide to Sheetize Spreadsheet Merger for combining multiple spreadsheet files.

Spreadsheet Splitter

Comprehensive guide to Sheetize Spreadsheet Splitter for splitting spreadsheets into multiple files.

Spreadsheet Unlocker

Comprehensive guide to Sheetize Spreadsheet Unlocker for removing protection from spreadsheets.

Text Converter

Comprehensive guide to Sheetize Text Converter for converting documents to and from plain text.

Nov 1, 2024

Subsections of Developer's Guide

HTML Converter

The Sheetize HTML Converter for .NET provides robust capabilities for converting documents between PDF and HTML formats, ideal for web applications, archiving, and report generation. With multiple options for handling resources and layouts, the converter adapts to various project requirements.

Key Features

PDF to HTML Conversion

Convert PDF files to HTML to make documents accessible for web-based viewing or integration into applications where HTML format is preferred.

HTML to PDF Conversion

Transform HTML content into high-quality PDFs, perfect for generating printable reports, archiving web content, or creating shareable document formats.


Detailed Guide

Converting PDF to HTML

To convert a PDF to HTML:

  1. Initialize the Converter: Create an instance of HtmlConverter.
  2. Set Conversion Options: Use PdfToHtmlOptions to customize output, choosing either embedded or external resources.
  3. Define Input and Output Paths: Set the paths for your input PDF and output HTML.
  4. Execute the Conversion: Call the Process method to convert the file.

Example: Convert PDF to HTML with Embedded Resources

// Step 1: Initialize the HTML Converter
var converter = new HtmlConverter();

// Step 2: Configure options for PDF to HTML conversion
var options = new PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType.FileWithEmbeddedResources);

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("output.html"));

// Step 4: Run the conversion
converter.Process(options);

Available Options for PDF to HTML Conversion

  • SaveDataType:

    • FileWithEmbeddedResources: Generates a single HTML file with all resources embedded.
    • FileWithExternalResources: Saves resources separately, ideal for large HTML files.
  • Output Customization:

    • BasePath: Set the base path for resources in the HTML document.
    • IsRenderToSinglePage: Optionally render all PDF content on a single HTML page.

Converting HTML to PDF

To convert an HTML document to a PDF, follow these steps:

  1. Initialize the Converter: Create an instance of the HtmlConverter.
  2. Configure PDF Options: Use HtmlToPdfOptions to define layout and media settings.
  3. Specify Paths: Set input HTML and output PDF file paths.
  4. Execute the Conversion: Run the Process method to complete the conversion.

Example: Convert HTML to PDF

// Step 1: Initialize the HTML Converter
var converter = new HtmlConverter();

// Step 2: Configure options for HTML to PDF conversion
var options = new HtmlToPdfOptions();

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.html"));
options.AddOutput(new FileDataSource("output.pdf"));

// Step 4: Execute the conversion
converter.Process(options);

Additional Options for HTML to PDF Conversion

  • Media Type:

    • HtmlMediaType.Print: Ideal for generating PDFs suited for printing.
    • HtmlMediaType.Screen: Use when converting content designed for digital viewing.
  • Layout Adjustments:

    • PageLayoutOption: Adjusts how HTML content fits the PDF layout, like ScaleToPageWidth to ensure the content scales to the PDF width.
    • IsRenderToSinglePage: Enables rendering the entire HTML content on a single PDF page if needed for concise presentations.

This converter is versatile for a variety of applications, from generating PDF reports based on web content to converting archives of PDF documents for web-based accessibility. For more advanced configurations, refer to the full Sheetize documentation.

Image Converter

The Sheetize Image Converter for .NET allows developers to convert documents to and from various image formats, making it ideal for applications involving document viewing, image archiving, and generating image-based content.

Key Features

PDF to Image Conversion

Convert PDF documents to image formats (e.g., PNG, JPEG), perfect for generating previews or for image-based document processing.

Image to PDF Conversion

Transform image files into PDF documents, suitable for combining images into a single file or creating PDF reports from image-based data.


Detailed Guide

Converting PDF to Image

To convert a PDF document to an image format:

  1. Initialize the Converter: Create an instance of ImageConverter.
  2. Set Conversion Options: Use PdfToImageOptions to specify the desired image format, resolution, and output quality.
  3. Define Input and Output Paths: Set paths for the input PDF and output image files.
  4. Execute the Conversion: Call the Process method to complete the conversion.

Example: Convert PDF to PNG Image

// Step 1: Initialize the Image Converter
var converter = new ImageConverter();

// Step 2: Configure options for PDF to Image conversion
var options = new PdfToImageOptions(ImageType.Png);
options.Resolution = 300; // Set resolution to 300 DPI
options.Quality = 90; // Set image quality to 90%

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("output.png"));

// Step 4: Run the conversion
converter.Process(options);

Available Options for PDF to Image Conversion

  • ImageType: Specify the desired image format (Png, Jpeg, Bmp, etc.).
  • Resolution: Set the resolution (DPI) for the output image.
  • Quality: Define the quality level (for JPEG output).

Converting Image to PDF

To convert an image to a PDF:

  1. Initialize the Converter: Create an instance of ImageConverter.
  2. Set Conversion Options: Use ImageToPdfOptions to customize the layout and appearance of the resulting PDF.
  3. Specify Paths: Set input image and output PDF file paths.
  4. Execute the Conversion: Call the Process method to generate the PDF.

Example: Convert PNG Image to PDF

// Step 1: Initialize the Image Converter
var converter = new ImageConverter();

// Step 2: Configure options for Image to PDF conversion
var options = new ImageToPdfOptions();
options.PageLayoutOption = PageLayoutOption.Centered;
options.ImageScalingOption = ImageScalingOption.FitToPage;

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.png"));
options.AddOutput(new FileDataSource("output.pdf"));

// Step 4: Execute the conversion
converter.Process(options);

Additional Options for Image to PDF Conversion

  • PageLayoutOption: Define how the image is placed on the PDF page (e.g., Centered, TopLeft).
  • ImageScalingOption: Control how the image fits within the PDF page (e.g., FitToPage, Stretch).

This converter is versatile for developers needing to work with image-based document content, whether generating high-quality document previews or bundling multiple images into PDFs for easy distribution.

eBook Converter

The Sheetize eBook Converter for .NET enables seamless conversion of documents to and from popular eBook formats such as EPUB and MOBI. It’s ideal for publishers, digital libraries, and developers integrating eBook functionality into their applications.

Key Features

PDF to EPUB Conversion

Easily convert PDF files to EPUB format, optimizing them for eReaders and other devices that support eBook formats.

EPUB to PDF Conversion

Convert eBook content from EPUB to PDF, making it suitable for printing or offline viewing in a standardized format.


Detailed Guide

Converting PDF to EPUB

To convert a PDF document to an EPUB eBook:

  1. Initialize the Converter: Create an instance of EbookConverter.
  2. Set Conversion Options: Use PdfToEpubOptions to configure settings for EPUB output, such as image handling and metadata.
  3. Define Input and Output Paths: Set paths for the input PDF and output EPUB.
  4. Execute the Conversion: Call the Process method to convert the document.

Example: Convert PDF to EPUB

// Step 1: Initialize the eBook Converter
var converter = new EbookConverter();

// Step 2: Configure options for PDF to EPUB conversion
var options = new PdfToEpubOptions();
options.IncludeImages = true; // Include images in the output EPUB
options.SetMetadata("Title", "Converted eBook");

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("output.epub"));

// Step 4: Run the conversion
converter.Process(options);

Available Options for PDF to EPUB Conversion

  • IncludeImages: Specify whether to include images from the original PDF in the resulting EPUB.
  • SetMetadata: Add metadata such as title, author, and subject to the EPUB file.

Converting EPUB to PDF

To convert an EPUB file to PDF:

  1. Initialize the Converter: Create an instance of EbookConverter.
  2. Configure PDF Options: Use EpubToPdfOptions to define settings such as page layout and margins.
  3. Specify Paths: Set the input EPUB and output PDF file paths.
  4. Execute the Conversion: Call the Process method to complete the conversion.

Example: Convert EPUB to PDF

// Step 1: Initialize the eBook Converter
var converter = new EbookConverter();

// Step 2: Configure options for EPUB to PDF conversion
var options = new EpubToPdfOptions();
options.PageLayoutOption = PageLayoutOption.Portrait;
options.Margin = new MarginSettings(10, 10, 10, 10);

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.epub"));
options.AddOutput(new FileDataSource("output.pdf"));

// Step 4: Execute the conversion
converter.Process(options);

Additional Options for EPUB to PDF Conversion

  • PageLayoutOption: Set the page layout for the resulting PDF, such as Portrait or Landscape.
  • MarginSettings: Define margins for the output PDF.

This converter is highly useful for both publishers and developers who need to automate eBook-related workflows. Whether creating eBooks from PDF documents or preparing eBook files for print, the Sheetize eBook Converter provides a flexible solution.

JSON Converter

The Sheetize JSON Converter for .NET offers robust functionality for converting documents to and from JSON format, enabling easy integration into web applications and data processing workflows.

Key Features

Document to JSON Conversion

Convert documents (e.g., PDF, DOCX) to JSON format to extract content in a structured format for further analysis or integration.

JSON to Document Conversion

Transform JSON data into document formats such as PDF or DOCX, allowing for easy report generation or document automation.


Detailed Guide

Converting Document to JSON

To convert a document to JSON:

  1. Initialize the Converter: Create an instance of JsonConverter.
  2. Set Conversion Options: Use DocumentToJsonOptions to configure how the document is represented in JSON.
  3. Define Input and Output Paths: Set paths for the input document and output JSON file.
  4. Execute the Conversion: Call the Process method to convert the document.

Example: Convert PDF to JSON

// Step 1: Initialize the JSON Converter
var converter = new JsonConverter();

// Step 2: Configure options for Document to JSON conversion
var options = new DocumentToJsonOptions();
options.IncludeMetadata = true; // Include metadata in the JSON output
options.FormatOutput = true; // Format the JSON output for readability

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("output.json"));

// Step 4: Run the conversion
converter.Process(options);

Available Options for Document to JSON Conversion

  • IncludeMetadata: Specify whether to include document metadata in the JSON output.
  • FormatOutput: Choose whether to format the JSON for readability.

Converting JSON to Document

To convert JSON data to a document:

  1. Initialize the Converter: Create an instance of JsonConverter.
  2. Set Conversion Options: Use JsonToDocumentOptions to define the target document format and layout.
  3. Specify Paths: Set input JSON and output document file paths.
  4. Execute the Conversion: Call the Process method to generate the document.

Example: Convert JSON to PDF

// Step 1: Initialize the JSON Converter
var converter = new JsonConverter();

// Step 2: Configure options for JSON to Document conversion
var options = new JsonToDocumentOptions(DocumentFormat.Pdf);
options.PageLayoutOption = PageLayoutOption.Portrait;

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.json"));
options.AddOutput(new FileDataSource("output.pdf"));

// Step 4: Execute the conversion
converter.Process(options);

Additional Options for JSON to Document Conversion

  • DocumentFormat: Specify the target format (Pdf, Docx, etc.).
  • PageLayoutOption: Define the page layout for the resulting document (Portrait, Landscape).

This converter provides powerful capabilities for integrating document content with web services and other data-driven applications. Whether extracting data from documents or generating documents from structured data, the Sheetize JSON Converter is an ideal solution for modern document workflows.

PDF Converter

The Sheetize PDF Converter for .NET offers advanced functionality for converting documents to and from PDF format, making it ideal for archiving, sharing, and ensuring consistent document formatting across different devices.

Key Features

Convert Various Formats to PDF

Convert documents from multiple formats, such as DOCX, HTML, and images, to PDF for easy distribution and printability.

Convert PDF to Other Formats

Convert PDF documents into other formats, such as DOCX, HTML, and images, for easy editing or integration into other workflows.


Detailed Guide

Converting Documents to PDF

To convert a document to PDF:

  1. Initialize the Converter: Create an instance of PdfConverter.
  2. Set Conversion Options: Use DocumentToPdfOptions to configure settings such as page layout and compression.
  3. Define Input and Output Paths: Set the paths for the input document and output PDF.
  4. Execute the Conversion: Call the Process method to convert the document.

Example: Convert DOCX to PDF

// Step 1: Initialize the PDF Converter
var converter = new PdfConverter();

// Step 2: Configure options for document to PDF conversion
var options = new DocumentToPdfOptions();
options.PageLayoutOption = PageLayoutOption.Portrait;
options.CompressionLevel = CompressionLevel.High;

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.docx"));
options.AddOutput(new FileDataSource("output.pdf"));

// Step 4: Run the conversion
converter.Process(options);

Available Options for Document to PDF Conversion

  • PageLayoutOption: Define the page layout for the resulting PDF (Portrait, Landscape).
  • CompressionLevel: Specify the compression level for reducing file size (Low, Medium, High).

Converting PDF to Other Formats

To convert a PDF document into another format:

  1. Initialize the Converter: Create an instance of PdfConverter.
  2. Configure Conversion Options: Use PdfToDocumentOptions to specify the output format and any customization.
  3. Specify Paths: Set the input PDF and output document file paths.
  4. Execute the Conversion: Call the Process method to complete the conversion.

Example: Convert PDF to DOCX

// Step 1: Initialize the PDF Converter
var converter = new PdfConverter();

// Step 2: Configure options for PDF to DOCX conversion
var options = new PdfToDocumentOptions(DocumentFormat.Docx);

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("output.docx"));

// Step 4: Execute the conversion
converter.Process(options);

Additional Options for PDF to Other Formats

  • DocumentFormat: Specify the desired output format (Docx, Html, Png, etc.).
  • TextExtractionMode: Define how text is extracted from the PDF (PlainText, FormattedText).

The Sheetize PDF Converter is an essential tool for managing documents, whether you need to create universally shareable PDF files or convert PDFs back to editable formats. It provides flexibility in both directions, making it a powerful addition to any developer’s toolkit.

Spreadsheet Converter

The Sheetize Spreadsheet Converter for .NET provides functionality to convert spreadsheets between different formats, making it suitable for data transformation, reporting, and integration tasks.

Key Features

Convert Spreadsheet to PDF

Convert spreadsheet files (e.g., XLSX, CSV) to PDF for easy sharing and printing.

Convert Spreadsheet to Other Formats

Convert spreadsheets to formats such as CSV, JSON, or HTML, enabling integration with web applications or data processing workflows.


Detailed Guide

Converting Spreadsheet to PDF

To convert a spreadsheet to PDF:

  1. Initialize the Converter: Create an instance of SpreadsheetConverter.
  2. Set Conversion Options: Use SpreadsheetToPdfOptions to configure settings such as page layout, fit options, and watermarking.
  3. Define Input and Output Paths: Set paths for the input spreadsheet and output PDF.
  4. Execute the Conversion: Call the Process method to complete the conversion.

Example: Convert XLSX to PDF

// Step 1: Initialize the Spreadsheet Converter
var converter = new SpreadsheetConverter();

// Step 2: Configure options for spreadsheet to PDF conversion
var options = new SpreadsheetToPdfOptions();
options.PageLayoutOption = PageLayoutOption.Landscape;
options.FitToPage = true; // Ensure the spreadsheet fits to a single page

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.xlsx"));
options.AddOutput(new FileDataSource("output.pdf"));

// Step 4: Run the conversion
converter.Process(options);

Available Options for Spreadsheet to PDF Conversion

  • PageLayoutOption: Define the page orientation for the resulting PDF (Portrait, Landscape).
  • FitToPage: Specify whether to fit the spreadsheet content onto a single page.

Converting Spreadsheet to Other Formats

To convert a spreadsheet into another format (e.g., CSV, HTML):

  1. Initialize the Converter: Create an instance of SpreadsheetConverter.
  2. Configure Conversion Options: Use SpreadsheetToDocumentOptions to specify the target format.
  3. Specify Paths: Set input spreadsheet and output file paths.
  4. Execute the Conversion: Call the Process method to generate the output.

Example: Convert XLSX to CSV

// Step 1: Initialize the Spreadsheet Converter
var converter = new SpreadsheetConverter();

// Step 2: Configure options for spreadsheet to CSV conversion
var options = new SpreadsheetToDocumentOptions(DocumentFormat.Csv);

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.xlsx"));
options.AddOutput(new FileDataSource("output.csv"));

// Step 4: Execute the conversion
converter.Process(options);

Additional Options for Spreadsheet to Document Conversion

  • DocumentFormat: Define the desired output format (Csv, Json, Html).
  • IncludeFormulas: Choose whether to include calculated formulas or only static values in the output.

The Sheetize Spreadsheet Converter is highly versatile, providing support for transforming spreadsheets into various formats to accommodate different needs. Whether you are creating PDF reports from spreadsheets or extracting data for processing, this converter offers a reliable solution for developers.

Spreadsheet Merger

The Sheetize Spreadsheet Merger for .NET allows developers to merge multiple spreadsheet files into one, ideal for consolidating data from different sources into a unified report.

Key Features

Merge Multiple Spreadsheets

Combine multiple spreadsheets into a single file, preserving data integrity and formatting.


Detailed Guide

Merging Spreadsheets

To merge multiple spreadsheets into one:

  1. Initialize the Merger: Create an instance of SpreadsheetMerger.
  2. Add Input Files: Add all the spreadsheets to be merged.
  3. Specify Output Path: Set the output file path for the merged spreadsheet.
  4. Execute the Merge: Call the Process method to merge the files.

Example: Merge Multiple XLSX Files

// Step 1: Initialize the Spreadsheet Merger
var merger = new SpreadsheetMerger();

// Step 2: Add input files
merger.AddInput(new FileDataSource("input1.xlsx"));
merger.AddInput(new FileDataSource("input2.xlsx"));

// Step 3: Set the output file path
merger.AddOutput(new FileDataSource("merged_output.xlsx"));

// Step 4: Run the merge process
merger.Process();

This functionality is especially useful for creating unified reports or consolidating data from multiple sources without manual intervention.

Spreadsheet Splitter

The Sheetize Spreadsheet Splitter for .NET helps developers split large spreadsheet files into smaller parts, ideal for data distribution and management.

Key Features

Split Spreadsheets into Smaller Files

Split large spreadsheet files by sheet, range, or custom rules for easier handling and sharing.


Detailed Guide

Splitting a Spreadsheet

To split a spreadsheet into multiple smaller files:

  1. Initialize the Splitter: Create an instance of SpreadsheetSplitter.
  2. Set Splitting Criteria: Use SplitterOptions to specify how to split (e.g., by sheet or by row count).
  3. Define Input and Output Paths: Set the input file and the paths for the output split files.
  4. Execute the Split: Call the Process method to split the file.

Example: Split XLSX by Sheet

// Step 1: Initialize the Spreadsheet Splitter
var splitter = new SpreadsheetSplitter();

// Step 2: Configure options for splitting by sheet
var options = new SplitterOptions(SplitMode.BySheet);

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.xlsx"));
options.AddOutput(new FileDataSource("output_directory"));

// Step 4: Execute the split process
splitter.Process(options);

This tool is perfect for dividing large files into smaller, manageable pieces, making data more accessible and easier to work with.

Spreadsheet Unlocker

The Sheetize Spreadsheet Unlocker for .NET provides the capability to remove protection from spreadsheets, allowing developers to edit or reformat locked content.

Key Features

Unlock Protected Spreadsheets

Remove password protection or sheet-level locking to enable modifications to the spreadsheet.


Detailed Guide

Unlocking a Protected Spreadsheet

To unlock a protected spreadsheet:

  1. Initialize the Unlocker: Create an instance of SpreadsheetUnlocker.
  2. Provide Unlocking Credentials: Set the password or specify other unlocking parameters.
  3. Define Input and Output Paths: Set the paths for the input locked file and the output unlocked file.
  4. Execute the Unlocking: Call the Process method to unlock the file.

Example: Unlock an XLSX File

// Step 1: Initialize the Spreadsheet Unlocker
var unlocker = new SpreadsheetUnlocker();

// Step 2: Set unlocking credentials
var options = new UnlockerLoadOptions();
options.Password = "password123";

// Step 3: Set file paths
options.AddInput(new FileDataSource("locked_input.xlsx"));
options.AddOutput(new FileDataSource("unlocked_output.xlsx"));

// Step 4: Run the unlocking process
unlocker.Process(options);

The Spreadsheet Unlocker is useful for developers needing to programmatically modify protected spreadsheets.

Text Converter

The Sheetize Text Converter for .NET enables the conversion of documents to and from plain text format, ideal for data extraction, archiving, and integration with text-based systems.

Key Features

Convert Documents to Plain Text

Extract text content from documents like PDF, DOCX, and HTML, useful for data processing and archiving.

Convert Plain Text to Document Formats

Create formatted documents from plain text, providing an easy way to generate reports or structured files.


Detailed Guide

Converting Document to Plain Text

To convert a document to plain text:

  1. Initialize the Converter: Create an instance of TextConverter.
  2. Set Conversion Options: Use DocumentToTextOptions to configure output settings.
  3. Define Input and Output Paths: Set paths for the input document and output text file.
  4. Execute the Conversion: Call the Process method to convert the document.

Example: Convert PDF to Plain Text

// Step 1: Initialize the Text Converter
var converter = new TextConverter();

// Step 2: Configure options for document to text conversion
var options = new DocumentToTextOptions();

// Step 3: Set file paths
options.AddInput(new FileDataSource("input.pdf"));
options.AddOutput(new FileDataSource("output.txt"));

// Step 4: Execute the conversion
converter.Process(options);

The Text Converter is essential for scenarios where text extraction is needed, such as creating archives or processing data in plain text.

 English