Aspose::Pdf::HtmlSaveOptions class

HtmlSaveOptions class

Save options for export to Html format.

class HtmlSaveOptions : public Aspose::Pdf::UnifiedSaveOptions,
                        public Aspose::Pdf::IPageSetOptions,
                        public Aspose::Pdf::IPipelineOptions

Methods

MethodDescription
get_AdditionalMarginWidthInPoints() constIf attribute ‘SplitOnPages=false’, than whole HTML representing all input PDF pages wont be not split into different HTML pages, but will be put into one big result HTML file. But each source PDF page will be represented with it’s own rectangle area in HTML (if necessary that areas can be bordered to show page paper edges with special attribute ‘PageBorderIfAny’. This parameter defines width of margin that will be forcibly left around that output HTML-areas that represent pages of source PDF document.In essence it defines guaranteed interval between HTML-representations of PDF “paper” pages such mode of conversion.
get_BatchSize() overrideDefines batch size if batched conversion is applicable to source and destination formats pair.
get_CacheGlyphs() constGets 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.
get_CloseResponse() constGets boolean value which indicates will Response object be closed after document saved into response.
get_CompressSvgGraphicsIfAny() constGets the flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving.
get_ConvertMarkedContentToLayers() constIf attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with “data-pdflayer” attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content.
get_DefaultFontName() constSpecifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used.
get_DocumentType() constGets the HtmlDocumentType.
get_ExplicitListOfSavedPages() overrideWith this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1…[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. If this list is null (as it is by default), all pages will be converted. If any page number of this list will go out of range of present pages(1-[amountOfPagesInDocument]) exception will be thrown.
get_ExtractOcrSublayerOnly() constThis atrribute turned on functionality for extracting image or text for PDF documents with OCR sublayer.
get_FixedLayout() constGets a value indicating whether that HTML is created as fixed layout.
get_FlowLayoutParagraphFullWidth() constThis attribute specifies full width paragraph text for Flow mode, FixedLayout = false.
get_FontSources() constFont sources of pre-saved fonts.
get_IgnoredTextFontSize() constText with the specified size or less will be ignored during conversion. We do not remove this text, we ignore it and do not transfer it to the output file.
get_IgnoreResourceFontErrors() constGets indication that errors related to absence of font will be ignored. true - means that errors of absence of font will be ignored. Text segments that refer to incorrect resources will be skipped during processing. false by default.
get_ImageResolution() constGets resolution for image rendering.
get_MinimalLineWidth() constThis attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers.
get_PreventGlyphsGrouping() constThis attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true.
get_RenderTextAsImage() constIf attribute RenderTextAsImage set to true, the text from the source becomes an image in HTML. May be useful to make text unselectable or HTML text is not rendered properly.
get_SaveFormat() constFormat of data save.
get_SimpleTextboxModeGrouping() constThis attribute specifies a sequential grouping of glyphs and words into strings For example tags and words has different order in converted HTML and you want them to match. This parameter will be applied to document only when the value of FixedLayout attribute is true.
get_SplitCssIntoPages() constWhen multipage-mode selected(i.e ‘SplitIntoPages’ is ’true’), then this attribute defines whether should be created separate CSS-file for each result HTML page. By default this attribute is false, so, will be created one big common CSS for all created pages. Summary size of all CSSes generated in this mode(one CSS per page) usually much more than size of one big CSS file, because in former case CSS classes are duplicates in such case in several CSS files for each page. So, this setting is worse to be used only when You are interested in future processing of each HTML page independently, and therefore size of CSS of each one page taken apart is the most critical issue.
get_SplitIntoPages() constGets the flag that indicates whether each page of source document will be converted into it’s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages.
get_Title() constGets HTML page title.
get_TryMergeFragments() constThe flag for combining image fragments into one picture.
get_UseZOrder() constIf attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects.
get_WarningHandler() constCallback 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.
HtmlSaveOptions()Initializes a new instance of the HtmlSaveOptions class.
HtmlSaveOptions(HtmlDocumentType)Initializes a new instance of the HtmlSaveOptions class.
HtmlSaveOptions(bool)Initializes a new instance of the HtmlSaveOptions class.
HtmlSaveOptions(HtmlDocumentType, bool)Initializes a new instance of the HtmlSaveOptions class.
set_AdditionalMarginWidthInPoints(int32_t)If attribute ‘SplitOnPages=false’, than whole HTML representing all input PDF pages wont be not split into different HTML pages, but will be put into one big result HTML file. But each source PDF page will be represented with it’s own rectangle area in HTML (if necessary that areas can be bordered to show page paper edges with special attribute ‘PageBorderIfAny’. This parameter defines width of margin that will be forcibly left around that output HTML-areas that represent pages of source PDF document.In essence it defines guaranteed interval between HTML-representations of PDF “paper” pages such mode of conversion.
set_BatchSize(int32_t) overrideDefines batch size if batched conversion is applicable to source and destination formats pair.
set_CacheGlyphs(bool)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.
set_CloseResponse(bool)Sets boolean value which indicates will Response object be closed after document saved into response.
set_CompressSvgGraphicsIfAny(bool)Sets the flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving.
set_ConvertMarkedContentToLayers(bool)If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with “data-pdflayer” attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content.
set_DefaultFontName(System::String)Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used.
set_DocumentType(HtmlDocumentType)Sets the HtmlDocumentType.
set_ExplicitListOfSavedPages(System::ArrayPtr<int32_t>) overrideWith this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1…[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. If this list is null (as it is by default), all pages will be converted. If any page number of this list will go out of range of present pages(1-[amountOfPagesInDocument]) exception will be thrown.
set_ExtractOcrSublayerOnly(bool)This atrribute turned on functionality for extracting image or text for PDF documents with OCR sublayer.
set_FixedLayout(bool)Sets a value indicating whether that HTML is created as fixed layout.
set_FlowLayoutParagraphFullWidth(bool)This attribute specifies full width paragraph text for Flow mode, FixedLayout = false.
set_IgnoredTextFontSize(System::Nullable<float>)Text with the specified size or less will be ignored during conversion. We do not remove this text, we ignore it and do not transfer it to the output file.
set_IgnoreResourceFontErrors(bool)Sets indication that errors related to absence of font will be ignored. true - means that errors of absence of font will be ignored. Text segments that refer to incorrect resources will be skipped during processing. false by default.
set_ImageResolution(int32_t)Sets resolution for image rendering.
set_MinimalLineWidth(float)This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers.
set_PreventGlyphsGrouping(bool)This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true.
set_RenderTextAsImage(bool)If attribute RenderTextAsImage set to true, the text from the source becomes an image in HTML. May be useful to make text unselectable or HTML text is not rendered properly.
set_SimpleTextboxModeGrouping(bool)This attribute specifies a sequential grouping of glyphs and words into strings For example tags and words has different order in converted HTML and you want them to match. This parameter will be applied to document only when the value of FixedLayout attribute is true.
set_SplitCssIntoPages(bool)When multipage-mode selected(i.e ‘SplitIntoPages’ is ’true’), then this attribute defines whether should be created separate CSS-file for each result HTML page. By default this attribute is false, so, will be created one big common CSS for all created pages. Summary size of all CSSes generated in this mode(one CSS per page) usually much more than size of one big CSS file, because in former case CSS classes are duplicates in such case in several CSS files for each page. So, this setting is worse to be used only when You are interested in future processing of each HTML page independently, and therefore size of CSS of each one page taken apart is the most critical issue.
set_SplitIntoPages(bool)Sets the flag that indicates whether each page of source document will be converted into it’s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages.
set_Title(System::String)Sets HTML page title.
set_TryMergeFragments(bool)The flag for combining image fragments into one picture.
set_UseZOrder(bool)If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects.
set_WarningHandler(System::SharedPtr<IWarningCallback>)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.
UnifiedSaveOptions()

Typedefs

TypedefDescription
CssSavingStrategy
CssUrlMakingStrategy
HtmlPageMarkupSavingStrategy
ResourceSavingStrategyTo this property You can assign delegate created from custom method that implements processing of external resource(Font or Image) that was extracted from PDF and must be saved as external resource during conversion of PDF to HTML. In such case processing (like saving in stream or disk) can be done in that custom code and that custom code must return path(or any another string without quotemarks) that will be afterwards incorporated into generated HTML instead of original supposed path to that image resource. In such case All the necessary actions for saving of image must be undertaken in code of supplied method, because saving of result in code of converter will be not in use . If processing for this or that file for some reason must be done by converter’s code itself, not in custom code, please set in custom code flag ‘CustomProcessingCancelled’ of ‘resourceSavingInfo’ parameter’s variable It signals to converter that all the necessary steps for processing of that resource must be done in converter itself as if there was no any external custom code .

See Also