PdfService class
A Manager that contains all operations for PDF services
- Inheritance
-
- Object
- Converter<
Delta, Document> - ConverterConfigurator<
Delta, Document> - PdfConfigurator<
Delta, Document> - PdfService
Constructors
-
PdfService.new({required PDFPageFormat params, required List<
Font> fonts, required Future<Font> onRequestBoldFont(String fontFamily), required Future<Font> onRequestBothFont(String fontFamily), required Future<List< onRequestFallbacks(String fontFamily)?, required Future<Font> ?>Font> onRequestFont(String fontFamily), required Future<Font> onRequestItalicFont(String fontFamily), required List<CustomConverter> customConverters, required Delta document, ThemeData? customTheme, Font? codeBlockFont, PdfColor? blockQuoteBackgroundColor, PdfColor? codeBlockBackgroundColor, TextStyle? codeBlockNumLinesTextStyle, TextStyle? codeBlockTextStyle, PdfColor? blockQuoteDividerColor, TextStyle? blockQuoteTextStyle, String customDeltaToHTMLConverter(Delta)?, String customHTMLToMarkdownConverter(String html)?, double? blockQuotePaddingLeft, double? blockQuotePaddingRight, double? blockQuotethicknessDividerColor, CustomPDFWidget? onDetectBlockquote, CustomPDFWidget? onDetectCodeBlock, CustomPDFWidget? onDetectAlignedParagraph, CustomPDFWidget? onDetectCommonText, CustomPDFWidget? onDetectHeaderAlignedBlock, CustomPDFWidget? onDetectHeaderBlock, CustomPDFWidget? onDetectImageBlock, CustomPDFWidget? onDetectInlineRichTextStyles, CustomPDFWidget? onDetectInlinesMarkdown, CustomPDFWidget? onDetectLink, CustomPDFWidget? onDetectList, ConverterOptions? converterOptions, Delta? backM, Delta? frontM})
Properties
- backM → Delta?
-
finalinherited
- blockQuoteBackgroundColor → PdfColor?
-
finalinherited
- blockQuoteDividerColor → PdfColor?
-
finalinherited
- blockQuotePaddingLeft → double?
-
finalinherited
- blockQuotePaddingRight → double?
-
finalinherited
- blockQuoteTextStyle → TextStyle?
-
finalinherited
- blockQuotethicknessDividerColor → double?
-
finalinherited
- codeBlockBackgroundColor → PdfColor?
-
finalinherited
- codeBlockFont → Font?
-
finalinherited
- codeBlockNumLinesTextStyle → TextStyle?
-
finalinherited
- codeBlockTextStyle → TextStyle?
-
finalinherited
- converterOptions → ConverterOptions?
-
final
-
customConverters
→ List<
CustomConverter> -
finalinherited
- customDeltaToHTMLConverter → String Function(Delta)?
-
final
- customHTMLToMarkdownConverter → String Function(String html)?
-
final
- defaultFontSize → int
-
finalinherited
- defaultLinkColor ↔ PdfColor
-
latefinalinherited
- defaultTextStyle ↔ TextStyle
-
latefinalinherited
- defaultTheme ↔ ThemeData
-
latefinalinherited
- document → Delta
-
no setterinherited
- frontM → Delta?
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- onDetectAlignedParagraph → CustomPDFWidget?
-
finalinherited
- onDetectBlockquote → CustomPDFWidget?
-
finalinherited
- onDetectCodeBlock → CustomPDFWidget?
-
finalinherited
- onDetectCommonText → CustomPDFWidget?
-
finalinherited
- onDetectHeaderAlignedBlock → CustomPDFWidget?
-
finalinherited
- onDetectHeaderBlock → CustomPDFWidget?
-
finalinherited
- onDetectImageBlock → CustomPDFWidget?
-
finalinherited
- onDetectInlineRichTextStyles → CustomPDFWidget?
-
finalinherited
- onDetectInlinesMarkdown → CustomPDFWidget?
-
finalinherited
- onDetectLink → CustomPDFWidget?
-
finalinherited
- onDetectList → CustomPDFWidget?
-
finalinherited
-
onRequestBoldFont
→ Future<
Font> Function(String fontFamily) -
finalinherited
-
onRequestBothFont
→ Future<
Font> Function(String fontFamily) -
finalinherited
-
onRequestFallbacks
→ Future<
List< Function(String fontFamily)?Font> ?> -
finalinherited
-
onRequestFont
→ Future<
Font> Function(String fontFamily) -
finalinherited
-
onRequestItalicFont
→ Future<
Font> Function(String fontFamily) -
finalinherited
- pageHeight ↔ double
-
latefinalinherited
- pageWidth ↔ double
-
latefinalinherited
-
rules
→ List<
Rule> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyInlineStyles(
String line, [TextStyle? style, bool addFontSize = true]) → Future< List< TextSpan> > -
inherited
-
blockGenerators(
List< String> lines, [Map<String, dynamic> ? extraInfo]) → Future<List< Widget> > -
This function generate widgets to create a book with custom views of the content
override
-
customRules(
List< Rule> customRules, {bool clearDefaultRules = false}) → void -
This fuction let us add new rules as we wants. We can clear the default rules, or just write our rules.
You can check html2md documentation about here: https://github.com/jarontai/html2md
inherited
-
generateDoc(
) → Future< Document> -
This functions generates the document
override
-
generatePages(
{required List< Delta> documents}) → Future<List< Map< >String, dynamic> > -
This function create a (valid) file
transforming
delta format to markdown
and detecting allmarkdown syntax
for put the attributes to the paragraphoverride -
getAlignedHeaderBlock(
String line, [TextStyle? style]) → Future< List< Widget> > -
inherited
-
getAlignedParagraphBlock(
String line, [TextStyle? style]) → Future< List< Widget> > -
inherited
-
getBlockQuote(
String line, [TextStyle? style]) → Future< List< Widget> > -
inherited
-
getCodeBlock(
String line, [TextStyle? style]) → Future< List< Widget> > -
inherited
-
getHeaderBlock(
String line, [TextStyle? style]) → Future< Widget> -
inherited
-
getImageBlock(
String line, [Alignment? alignment]) → Future< Widget?> -
inherited
-
getInlineStyles(
String line, [TextStyle? style]) → Future< List< TextSpan> > -
inherited
-
getLinkStyle(
String line, [TextStyle? style, bool addFontSize = true]) → Future< List< TextSpan> > -
inherited
-
getListBlock(
String line, bool isCheckList, [TextStyle? style]) → Future< Widget> -
inherited
-
getNewLinesWithSpacing(
String line, [TextStyle? style]) → Future< List< TextSpan> > -
inherited
-
getRichTextInlineStyles(
String line, [TextStyle? style, bool returnContentIfNeedIt = false, bool addFontSize = true]) → Future< List< InlineSpan> > -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited