- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
pdftron::PDF::ReflowProcessor Class Reference

`#include <ReflowProcessor.h>`

## Static Public Member Functions
static void | Initialize ()
static bool | IsInitialized ()
static void | GetReflow (const Page &page, JobRequest::ProcHandler proc, void *custom_data)
static void | CancelAllRequests ()
static void | CancelRequest (const Page &page)
static void | ClearCache ()
static void | SetNoReflowContent (const UString &utf8_content)
static void | SetReflowFailedContent (const UString &utf8_content)

## Detailed Description

ReflowProcessor is a processor that manages the requests of converting PDF page documents to reflow documents as HTML files. The output reflowable HTML file is identified by the requested page itself. For each PDF document that at least one of its page is requested for converting to reflow, a folder is created in cache directory. The folder name will be set to a unique ID of the PDF document (obtained from PDFUtil::GetUniqueIdString). Also, the output HTML file is obtained by the page object number. For example, the output HTML path of a PDF page with document ID of 2740180447,229945,WT1NOmJhyyH9xNqwbEbbOg== and object number of 123 will be ../trn_reflowcache/2740180447,229945,WT1NOmJhyyH9xNqwbEbbOg==/123.html

The cache is placed in the sub-directory 'trn_reflowcache' of the PDFNet Resources folder, which can be set by calling PDFNet::SetPersistentCachePath. In the case the PersistentCachePath is not set the HTML files will be stored in the system temp path (PDFNet::GetSystemTempPath()). The cache will be used by any PDFNet process that uses the resource path. If more than one PDFNet process is running concurrently, the first process to acquire a lock on the cache will use it. Subsequent processes will not read or modify the cache.

Definition at line 37 of file ReflowProcessor.h.

## Member Function Documentation

static void pdftron::PDF::ReflowProcessor::CancelAllRequests | ( |  | ) |
| static

Cancels all job requests.

static void pdftron::PDF::ReflowProcessor::CancelRequest | ( | const Page & | page | ) |
| static

Cancels the request associated with a certain page.

static void pdftron::PDF::ReflowProcessor::ClearCache | ( |  | ) |
| static

Cancels all requests belonging to the document. clears the reflow disk cache.

static void pdftron::PDF::ReflowProcessor::GetReflow | ( | const Page & | page,
|  | JobRequest::ProcHandler | proc,
|  | void * | custom_data
| ) |  |
| static

Requests for extracting reflow from a page and calling back the proc handler thereafter

Parameters

  page | - The page
  proc | - A callback function that will be called after the process is finished, or if that process fails
  custom_data | - Custom data to be passed to the ProcHandler

static void pdftron::PDF::ReflowProcessor::Initialize | ( |  | ) |
| static

Initializes reflow cache and job queues.

NOTE: This method clears everything in reflow disk cache.

static bool pdftron::PDF::ReflowProcessor::IsInitialized | ( |  | ) |
| static

Checks whether reflow has been already initialized or not.

static void pdftron::PDF::ReflowProcessor::SetNoReflowContent | ( | const UString & | utf8_content | ) |
| static

sets the content when a page doesn't contain reflowable text

static void pdftron::PDF::ReflowProcessor::SetReflowFailedContent | ( | const UString & | utf8_content | ) |
| static

sets the content when it is failed to extract reflowable text

The documentation for this class was generated from the following file:

- PDF/ReflowProcessor.h