PdfHandlerInterface class abstract

An abstract class that defines a PDFHandler, which is responsible for saving PDF files to disk or to an external service.

This class provides a common interface for handling PDF files and can be extended to implement different storage strategies such as saving files to local disk, uploading files to a cloud storage service, or emailing PDF files to recipients.

To implement a specific storage strategy, extend this class and implement the savePdf method, which takes in a PdfDocument object and saves it to the desired location. The PdfDocument class provides an API for generating PDF documents with custom layouts, fonts, and other features.

The PDFHandler class also defines a getFileName method that generates a unique filename for the PDF file based on the current timestamp and other parameters. This helps prevent filename collisions and makes it easy to manage multiple PDF files.

To use a specific implementation of PDFHandler, simply create an instance of the subclass and call the savePdf method with a PdfDocument object. The PDF file will be saved to the specified location based on the implementation details of the subclass.

Implementers

Constructors

PdfHandlerInterface()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

capturePng(GlobalKey<State<StatefulWidget>> key) Future<Uint8List>
capturePng
createPDF(GlobalKey<State<StatefulWidget>> key) Future<GlobalKey<State<StatefulWidget>>>
createPDF
createResume(GlobalKey<State<StatefulWidget>> key) Future<void>
createResume
findLocalPath() Future<String?>
findLocalPath
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareSaveDir() Future<Directory>
prepareSaveDir
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited