Does full reflow support rasterizing vector images?

Product: PDFNet server SDK (python) + StructuredOutput

Product Version: 12.1.0

Please give a brief summary of your issue:
Full reflow keeps raster images but drops vector images.

Please describe your issue and provide steps to reproduce it:
When I use StructuredOutput with full reflow to convert to HTML, vector images are dropped. Raster/bitmap images work. Trying paragraph reflow returns the images, albeit not in their correct locations. I wonder if there is an option to rasterize vector image regions in full reflow mode.

Please provide a link to a minimal sample where the issue is reproducible:

I’ve attached a document. The image in question is the bar chart on page 2.

pdf_structure_test_2pages.pdf (16.0 KB)

1 Like

Hi Erik,

I understand you’re seeing some unexpected behavior surrounding documents containing vector-based images during PDF → HTML conversions with the Structured Output module. I would ask that you provide the following information so that I can better isolate the behavior seen:

  1. Can you provide a small code snippet demonstrating your workflow, including any options set for this conversion?
  2. Can you indicate what platform you’re using with the PDFNet SDK & python, i.e. Windows, Linux? Please include version / distribution (if available).
  3. You’ve said that the image is dropped; have you happened to have inspected the resulting HTML content to see if the vector image is still referenced?

Thanks,
Kaden Rettig
Technical Support Engineer
Apryse Support Team

1 Like

Hello Kaden,

  1. An excerpt of code is below (Code reference 1). I’ve snipped it out of the surrounding error handling code to keep it readable, but it at least shows options and methods used.

  2. I’ve tried this on the ARM64 build on Linux and MacOS (Structured Output Module (64-bit ARM) for Linux, Structured Output Module for MacOS), currently on version 12.1.0. The SDK was installed as the Apryse-supplied wheel with as a Python pip package install:

    https://pypi.apryse.com/apryse-sdk/apryse_sdk-12.1.0-cp35-abi3-manylinux2014_aarch64.whl (sha256=47f6b36e38ad87a938f8d2683a581c5d78c543cb38ee9bc66e5533b0dadac40a)

  3. The image is gone. I attach a zip of the output. The part where the image is in the original has no reference to it. It is excerpted in Code reference 2 below.

Code reference 1: Options and execution

from apryse_sdk import PDFNet, StructuredOutputModule, Convert, HTMLOutputOptions

PDFNet.Initialize(license_key)
opts = HTMLOutputOptions()
opts.SetContentReflowSetting(HTMLOutputOptions.e_reflow_full)
opts.SetSearchableImageSetting(HTMLOutputOptions.e_ocr_off)
Convert.ToHtml(str(pdf_path), str(output_path), opts)

Code reference 2: Output snippet

<li data-list-text="6.">
            <h2 style="padding-left: 18pt;text-indent: -13pt;text-align: left;"><span
                    style=" color: black; font-family:Arial, sans-serif; font-style: normal; font-weight: bold; text-decoration: none; font-size: 12pt;">Chart
                    and Figure</span></h2>
            <p style="padding-top: 5pt;text-indent: 0pt;text-align: left;"><br /></p>
            <p style="text-indent: 0pt;text-align: left;" />
            <p class="s15" style="padding-left: 18pt;text-indent: 0pt;text-align: left;">30</p>
            <p class="s15" style="padding-top: 3pt;padding-left: 18pt;text-indent: 0pt;text-align: left;">25</p>
            <p class="s15" style="padding-top: 3pt;padding-left: 18pt;text-indent: 0pt;text-align: left;">20</p>
            <p class="s15" style="padding-top: 3pt;padding-left: 18pt;text-indent: 0pt;text-align: left;">15</p>
            <p class="s15" style="padding-top: 3pt;padding-left: 18pt;text-indent: 0pt;text-align: left;">10</p>
            <p class="s15" style="padding-top: 3pt;padding-left: 21pt;text-indent: 0pt;text-align: left;">5</p>
            <p class="s15" style="padding-top: 3pt;padding-left: 21pt;text-indent: 0pt;text-align: left;">0</p>
            <p class="s15" style="padding-top: 1pt;padding-left: 57pt;text-indent: 0pt;text-align: left;">Q1 Q2 Q3 Q4
            </p>
            <p class="s16" style="padding-top: 4pt;padding-left: 1pt;text-indent: 0pt;text-align: center;">Figure 1:
                Quarterly results by series.</p>
        </li>

output.zip (5.7 KB)

1 Like

Hello Erik,

Thanks for this additional information! After doing some testing, I’ve found that this behavior occurs on both Windows and Linux with HTMLOutputOptions.e_reflow_full enabled; other reflow options / HTML output options do not affect this behavior. It’s also not document-specific.

As such, I’ve submitted a report to our Engineering team so that it may be investigated further to determine whether full reflow with vector images should be supported. I will reach out here as soon as I’ve received any updates from our team; in the meantime, please don’t hesitate to reach out here, via a new post, or our Support Portal!

Thanks,
Kaden Rettig
Technical Support Engineer
Apryse Support Team