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({required PDFPageFormat pageFormat, required List<
Font> fonts, TextDirection textDirection = pw.TextDirection.ltr, Future<Font> onRequestBoldFont(String fontFamily)?, Future<Font> onRequestBothFont(String fontFamily)?, Future<List< onRequestFallbacks(String fontFamily)?, Future<Font> ?>Font> onRequestFont(String fontFamily)?, Future<Font> onRequestItalicFont(String fontFamily)?, required List<CustomWidget> customBuilders, required Delta document, ThemeData? customTheme, Font? codeBlockFont, PdfColor? blockQuoteBackgroundColor, PdfColor? codeBlockBackgroundColor, TextStyle? codeBlockNumLinesTextStyle, TextStyle? codeBlockTextStyle, PdfColor? blockQuoteDividerColor, TextStyle? blockQuoteTextStyle, double? blockQuotePaddingLeft, double? blockQuotePaddingRight, double? blockQuotethicknessDividerColor, PDFWidgetBuilder<List< ? onDetectBlockquote, PDFWidgetBuilder<InlineSpan> , Widget>List< ? onDetectCodeBlock, PDFWidgetBuilder<InlineSpan> , Widget>List< ? onDetectAlignedParagraph, PDFWidgetBuilder<InlineSpan> , Widget>Line, List< ? onDetectCommonText, PDFWidgetBuilder<InlineSpan> >List< ? onDetectHeaderBlock, PDFWidgetBuilder<InlineSpan> , Widget>Line, Widget> ? onDetectImageBlock, PDFWidgetBuilder<Line, List< ? onDetectInlineRichTextStyles, PDFWidgetBuilder<InlineSpan> >Line, List< ? onDetectLink, PDFWidgetBuilder<InlineSpan> >List< ? onDetectList, Delta? backM, Delta? frontM})InlineSpan> , Widget>
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
-
contentPerPage
→ List<
Widget> -
final
-
customBuilders
→ List<
CustomWidget> -
finalinherited
- 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
- lastListIndent ↔ int
-
getter/setter pairinherited
- numberIndent1List ↔ int
-
getter/setter pairinherited
- numberIndent2List ↔ int
-
getter/setter pairinherited
- numberIndent3List ↔ int
-
getter/setter pairinherited
- numberIndent4List ↔ int
-
getter/setter pairinherited
- numberIndent5List ↔ int
-
getter/setter pairinherited
- numberList ↔ int
-
getter/setter pairinherited
- numCodeLine ↔ int
-
getter/setter pairinherited
-
onDetectAlignedParagraph
→ PDFWidgetBuilder<
List< ?InlineSpan> , Widget> -
finalinherited
-
onDetectBlockquote
→ PDFWidgetBuilder<
List< ?InlineSpan> , Widget> -
finalinherited
-
onDetectCodeBlock
→ PDFWidgetBuilder<
List< ?InlineSpan> , Widget> -
finalinherited
-
onDetectCommonText
→ PDFWidgetBuilder<
Line, List< ?InlineSpan> > -
finalinherited
-
onDetectHeaderBlock
→ PDFWidgetBuilder<
List< ?InlineSpan> , Widget> -
finalinherited
-
onDetectImageBlock
→ PDFWidgetBuilder<
Line, Widget> ? -
finalinherited
-
onDetectInlineRichTextStyles
→ PDFWidgetBuilder<
Line, List< ?InlineSpan> > -
finalinherited
-
onDetectLink
→ PDFWidgetBuilder<
Line, List< ?InlineSpan> > -
finalinherited
-
onDetectList
→ PDFWidgetBuilder<
List< ?InlineSpan> , Widget> -
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textDirection → TextDirection
-
final
Methods
-
blockGenerators(
Document document) → Future< List< Widget> > -
This function generate widgets to create a book with custom views of the content
override
-
generateDoc(
) → Future< Document> -
This functions generates the document
override
-
generatePages(
{required List< Delta> documents}) → Future<List< List< >Widget> > -
This function create a (valid) file
transforming
delta format to markdown
and detecting allmarkdown syntax
for put the attributes to the paragraphoverride -
generateWidget(
{double? maxWidth, double? maxHeight}) → Future< Widget> -
Use generateWidget to create whole widgets that are
commonly pasted into a document, giving you full control
of the new widgets generated
override
-
getAlignedHeaderBlock(
List< InlineSpan> spansToWrap, int headerLevel, String align, int indentLevel, [TextStyle? style]) → Future<Widget> -
inherited
-
getAlignedParagraphBlock(
List< InlineSpan> spansToWrap, String align, int indentLevel, [TextStyle? style]) → Future<Widget> -
inherited
-
getBlockQuote(
List< InlineSpan> spansToWrap, [TextStyle? style]) → Future<Widget> -
inherited
-
getCodeBlock(
List< InlineSpan> spansToWrap, [TextStyle? style]) → Future<Widget> -
inherited
-
getHeaderBlock(
List< InlineSpan> spansToWrap, int headerLevel, int indentLevel, [TextStyle? style]) → Future<Widget> -
inherited
-
getImageBlock(
Line line, [Alignment? alignment]) → Future< Widget> -
inherited
-
getLinkStyle(
Line line, [TextStyle? style, bool addFontSize = true]) → Future< List< TextSpan> > -
inherited
-
getListBlock(
List< InlineSpan> spansToWrap, String listType, String align, int indentLevel, [TextStyle? style]) → Future<Widget> -
inherited
-
getRichTextInlineStyles(
Line 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
-
verifyBlock(
Map< String, dynamic> ? blockAttributes) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited