File Content Extraction 25.1
HTML Export SDK C Programming Guide

# Configure the Size of Exported Images

When you use the `pdf2sr` reader to export images of the pages in a PDF file, you can configure the size of the images produced by File Content Extraction.

To configure the size of images produced by pdf2sr

1. Open the configuration file `formats_e.ini`.
2. Find the section `[pdf2sr]`, or create the section if it does not exist.

3. Set the configuration parameters `HTMLXRes` and `HTMLYRes`. `HTMLXRes` specifies the width of the output image and `HTMLYRes` specifies the height.

   - To specify an absolute size, in pixels, use positive values. The aspect ratio is always maintained, so you can set one of the dimensions and set the other parameter to `0`. For example, to output images of PDF pages where the height of each image is 400 pixels, use the following configuration:

         [pdf2sr]
         HTMLXRes=0
         HTMLYRes=400

     If you set both `HTMLXRes` and `HTMLYRes` to positive values, File Content Extraction produces the largest image that fits within the specified dimensions (the width or height will be as requested, and the other dimension is smaller than requested if required to preserve the aspect ratio).

   - To specify a relative size, set `HTMLXRes` to a negative value and `HTMLYRes` to `0` (a negative value for `HTMLYRes` is ignored). The aspect ratio is always maintained. For example, to output images of PDF pages where the size of each image is 150% of the original size, use the following configuration.

         [pdf2sr]
         HTMLXRes=-150
         HTMLYRes=0

NOTE: The default values for `HTMLXRes` and `HTMLYRes` are shown below. These values produce an image at 113% of the original page size:

    [pdf2sr]
    HTMLXRes=-113
    HTMLYRes=0

Copyright 1997-2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 25.1

Topic Title: Configure the Size of Exported Images