Skip to content

Repository files navigation

GroupDocs.Conversion.LowCode - F# Code Examples

This repository contains 69+ complete, runnable examples demonstrating various features of GroupDocs.Conversion.LowCode for F# (.NET 6.0+). These examples provide practical implementations for document conversion scenarios.

πŸ“‹ Overview

πŸ“ Directory Structure

The examples are organized to mirror the official documentation structure:

groupdocs-conversion-lowcode-examples-fsharp/
β”œβ”€β”€ πŸ“‚ Examples/
β”‚   β”œβ”€β”€ πŸ“‚ developer-guide/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ CopyTheCodeExample/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ loading-source-documents/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ LoadFromFilePath/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ LoadFromStream/
β”‚   β”‚   β”‚   └── πŸ“‚ SetLoadOptions/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ saving-converted-documents/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ SaveToFilePath/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ SaveToStream/
β”‚   β”‚   β”‚   └── πŸ“‚ SetConvertOptions/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-doc-to-pdf-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ DocToPasswordProtectedPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ DocToPdfaFormat/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ DocWithCommentsToPdfWithoutComments/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ DocWithTrackedChangesToPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProtectedDocToPdf/
β”‚   β”‚   β”‚   └── πŸ“‚ SpecificDocPagesToPdf/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-docx-to-pdf-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ DocxToPasswordProtectedPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ DocxWithCommentsToPdfWithoutComments/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ DocxWithTrackedChangesToPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProtectedDocxToPdf/
β”‚   β”‚   β”‚   └── πŸ“‚ SpecificDocxPagesToPdf/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-html-to-pdf-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ HtmlToPasswordProtectedPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ HtmlToPdfWithSpecificPdfFormat/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ HtmlWithCustomCssStyling/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ HtmlWithZoomLevel/
β”‚   β”‚   β”‚   └── πŸ“‚ SkipExternalResourcesReferencedInHtml/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-pdf-to-docx-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ FlattenFieldsInFormFillablePdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PdfToDocxWithA4PageSize/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PdfToPasswordProtectedDocx/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PdfWithAnnotationsToDocxWithoutAnnotations/
β”‚   β”‚   β”‚   └── πŸ“‚ ProtectedPdfToDocx/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-pdf-to-md-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ FlattenFieldsInFormFillablePdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PdfWithAnnotationsToMarkdownWithoutAnnotations/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProtectedPdfToMarkdown/
β”‚   β”‚   β”‚   └── πŸ“‚ SkipImagesWhenConvertingPdfToMarkdown/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-pdf-to-pdfa-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ FlattenFieldsInFormFillablePdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PdfToPasswordProtectedPdfa/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PdfWithAnnotationsToPdfaWithoutAnnotations/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProtectedPdfToPdfa/
β”‚   β”‚   β”‚   └── πŸ“‚ SpecificPdfPagesToPdfa/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-ppt-to-pdf-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PptToPasswordProtectedPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PptWithHiddenSlides/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PptWithPreservedDocumentStructureForAccessiblePdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProtectedPptToPdf/
β”‚   β”‚   β”‚   └── πŸ“‚ SpecificPptSlidesToPdf/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-pptx-to-pdf-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PptxToPasswordProtectedPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PptxWithHiddenSlides/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ PreserveDocumentStructureForAccessiblePdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProtectedPptxToPdf/
β”‚   β”‚   β”‚   └── πŸ“‚ SpecificPptxSlidesToPdf/
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ using-xls-to-pdf-converter/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ ProtectedXlsToPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ SpecificSheetsFromXlsToPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ XlsToPasswordProtectedPdf/
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“‚ XlsToPdfWithSpecificPdfFormat/
β”‚   β”‚   β”‚   └── πŸ“‚ XlsWithHiddenSheets/
β”‚   β”‚   └── πŸ“‚ using-xlsx-to-pdf-converter/
β”‚   β”‚       β”œβ”€β”€ πŸ“‚ BasicExample/
β”‚   β”‚       β”œβ”€β”€ πŸ“‚ ProtectedXlsxToPdf/
β”‚   β”‚       β”œβ”€β”€ πŸ“‚ SpecificSheetsFromXlsxToPdf/
β”‚   β”‚       β”œβ”€β”€ πŸ“‚ XlsxToPasswordProtectedPdf/
β”‚   β”‚       β”œβ”€β”€ πŸ“‚ XlsxToPdfWithSpecificPdfFormat/
β”‚   β”‚       └── πŸ“‚ XlsxWithHiddenSheetsToPdf/
β”‚   └── πŸ“‚ licensing/
β”‚       β”œβ”€β”€ πŸ“‚ SetLicenseFromFile/
β”‚       └── πŸ“‚ SetLicenseKeys/
β”œβ”€β”€ πŸ“„ GroupDocs.Conversion.LowCode.Examples.sln
β”œβ”€β”€ πŸ“„ LICENSE
β”œβ”€β”€ πŸ“„ README.md
β”œβ”€β”€ πŸš€ run_all_examples.bat
β”œβ”€β”€ πŸš€ run_all_examples.ps1
└── πŸš€ run_all_examples.sh

🎯 Example Categories

Licensing

  • Set License Keys: Programmatic license setup using keys
  • Set License From File: License setup using license file

Developer Guide

Document Loading

  • Load From FilePath: Load documents using file paths
  • Load From Stream: Load documents using file streams
  • Set Load Options: Configure document loading options

Document Saving

  • Save To FilePath: Save converted documents to file paths
  • Save To Stream: Save converted documents to streams
  • Set Convert Options: Configure conversion options

Document Converters

  • DOC to PDF: Convert legacy Word documents to PDF
  • DOCX to PDF: Convert modern Word documents to PDF
  • HTML to PDF: Convert HTML files to PDF
  • PDF to DOCX: Convert PDF to Word documents
  • PDF to Markdown: Convert PDF to Markdown format
  • PDF to PDF/A: Convert PDF to archival format
  • PPT to PDF: Convert PowerPoint presentations to PDF
  • PPTX to PDF: Convert modern PowerPoint presentations to PDF
  • XLS to PDF: Convert legacy Excel spreadsheets to PDF
  • XLSX to PDF: Convert modern Excel spreadsheets to PDF

πŸš€ How to Run Code Examples

Prerequisites

  • .NET 6.0 or later installed on your system
  • Valid GroupDocs license (trial or commercial)
  • Sample files (automatically included with examples)

Setup License

Option 1: Environment Variables (Recommended)

# Windows
set GD_PUBLIC_KEY=your-public-key
set GD_PRIVATE_KEY=your-private-key

# Linux/macOS
export GD_PUBLIC_KEY=your-public-key
export GD_PRIVATE_KEY=your-private-key

Option 2: Direct in Code

Edit the Program.fs file and replace placeholder values:

let publicKey = "your-public-key"
let privateKey = "your-private-key"

Note: Learn more about licensing at https://docs.groupdocs.net/conversion/licensing/.

Running Individual Examples

  1. Navigate to any example directory:

    cd Examples/developer-guide/using-docx-to-pdf-converter/BasicExample
  2. Restore dependencies (first time only):

    dotnet restore
  3. Run the example:

    dotnet run
  4. Check the output:

    • Look for generated files in the example directory (or an output subfolder, if present)
    • Check console output for any errors or success messages

Running All Examples

Use the provided scripts to run all examples sequentially:

Windows (Command Prompt)

run_all_examples.bat

Windows (PowerShell)

./run_all_examples.ps1

Linux/macOS

./run_all_examples.sh

πŸ“ Notes

  • Examples are generated automatically from documentation
  • Some examples may require specific sample files to be present
  • Make sure to handle any exceptions that may occur during conversion
  • Check the individual README files in each example directory for specific details

πŸ†˜ Support

For issues with the examples or GroupDocs.Conversion.LowCode, please refer to:

About

GroupDocs.Conversion.LowCode - F# Code Examples

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages