Class EpubSaveOptions

EpubSaveOptions class

Save options for export to EPUB format

public class EpubSaveOptions : UnifiedSaveOptions

Constructors

NameDescription
EpubSaveOptions()The default constructor.

Properties

NameDescription
CacheGlyphs { get; set; }Gets or sets boolean value which indicates if will font glyphs be cached while preparing aps pages. Improves performance of conversion pdf to other formats but increases memory consumption.
CloseResponse { get; set; }Gets or sets boolean value which indicates will Response object be closed after document saved into response.
ExtractOcrSublayerOnly { get; set; }This atrribute turned on functionality for extracting image or text for PDF documents with OCR sublayer.
SaveFormat { get; }Format of data save.
Title { get; set; }Gets or sets EPUB document title.
WarningHandler { get; set; }Callback to handle any warnings generated. The WarningHandler returns ReturnAction enum item specifying either Continue or Abort. Continue is the default action and the Save operation continues, however the user may also return Abort in which case the Save operation should cease.

Fields

NameDescription
ContentRecognitionModeWhen PDF file (that usually has fixed layout) is being converted, the conversion engine tries to perform grouping and multi-level analysis to restore the original document author’s intent and produce result in flow layout. This property tunes that conversion for this or that desirable method of recognition of content.
IsMultiThreadingProcess pages in few threads.
TryMergeAdjacentSameBackgroundImagesSometimes PDFs contain background images (of pages or table cells) constructed from several same tiling background images put one near other. In such case renderers of target formats (f.e MsWord for DOCS format) sometimes generates visible boundaries beetween parts of background images, cause their techniques of image edge smoothing (anti-aliasing) is different from Acrobat Reader. If it looks like exported document contains such visible boundaries between parts of same background images, please try use this setting to get rid of that unwanted effect. ATTENTION! This optimization of quality usually essentially slows down conversion, so, please, use this option only when it’s really necessary.

Examples

The following example shows how to convert PDF file to EPUB file

	[C#]
	// The path to the documents directory.
	string dataDir = "YOUR_DATA_DIRECTORY";

	// The path to your PDF File.
	var pdfFile = Path.Combine(dataDir, "PDF-to-EPUB.pdf");

	// The path to output EPUB File.
	var epubFile = Path.Combine(dataDir, "PDF-to-EPUB.epub");
		
	using (Document pdfDocument = new Document(pdfFile))
	{

		// Initialize EpubSaveOptions 	
		EpubSaveOptions saveOptions = new EpubSaveOptions();
		
		// Save EPUB file
		pdfDocument.Save(epubFile, saveOptions);
	}
[VB.NET]

    ' The path to the documents directory.
    Dim dataDir As String = "YOUR_DATA_DIRECTORY"

    ' The path to your PDF File.
    Dim pdfFile = Path.Combine(dataDir, "PDF-to-EPUB.pdf")

    ' The path to output EPUB File.
    Dim epubFile = Path.Combine(dataDir, "PDF-to-EPUB.epub")
 
    Using pdfDocument As Document = New Document(pdfFile)

        ' Initialize EpubSaveOptions    
        Dim saveOptions As EpubSaveOptions = New EpubSaveOptions()
 
        ' Save EPUB file
        pdfDocument.Save(epubFile, saveOptions)
    End Using

See Also