pdf_document
This module contains class for the PDF document.
Classes
PdfDocument
: A class representing a PDF document.
PdfDocument
Bases: Document
A class representing a PDF document.
Methods
convert_file()
: A method for converting file.
Source code in backend/api/converter/document_converter/document/pdf_document.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
__init__(file, output)
Initialize the PdfDocument object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
str
|
A string representing the path of the file to be converted. |
required |
output |
str
|
A string representing the path of output file. |
required |
Source code in backend/api/converter/document_converter/document/pdf_document.py
21 22 23 24 25 26 27 28 |
|
convert_file()
Convert a html file to a PDF file using the pdfkit library.
Source code in backend/api/converter/document_converter/document/pdf_document.py
30 31 32 33 |
|