Link
Skip to main content

Text Modes

The text mode controls how text and page content are rendered in the HTML output, for example whether text is output as real, selectable text or drawn as part of an image.

Each value has the form <background>_<text>. The first part sets how the background (presentation) layer is rendered; the second part sets how text is rendered:

  • Background (svg or image) - svg keeps vector content as SVG (zoomable, higher quality), while image rasterises everything onto a single image (smaller and faster, but pixelates on zoom).
  • Text (realtext or shapetext) - realtext outputs real, selectable text positioned with HTML and CSS (not vector outlines), while shapetext draws the text into the background layer as shapes, with selectable and nonselectable variants.

So the default svg_realtext means an SVG background with real HTML/CSS text; the text itself is not drawn as SVG. See Text Mode Options for a full description of each mode.

Expected values:

  • svg_realtext
  • svg_shapetext_selectable
  • svg_shapetext_nonselectable
  • image_realtext
  • image_shapetext_selectable
  • image_shapetext_nonselectable

Default: svg_realtext

Usage Examples

Command Line

-Dorg.jpedal.pdf2html.textMode="svg_shapetext_nonselectable"

Cloud

{ "org.jpedal.pdf2html.textMode": "svg_shapetext_nonselectable" }

Java

conversionOptions.setTextMode(ConversionOptions.TextMode.SVG_SHAPETEXT_NONSELECTABLE);

What's included in your BuildVu trial?

  • Access to download the SDK and run it locally.
  • Access to the cloud trial to convert documents in the IDR cloud.
  • Access to the Docker image to set up your own trial server in the cloud.
  • Communicate with IDR developers to ask questions & get expert advice.
  • Plenty of time to experiment and build a proof of concept.
  • Over 100 articles to help you get started and learn about BuildVu.
  • An exceptional PDF to HTML converter that took over 20 years to build!

Learn more about BuildVu

Start Your Free Trial

Trial License Type