src/eric7/QScintilla/Exporters/ExporterPDF.py

branch
eric7
changeset 9500
5771348ded12
parent 9487
78cb053591c9
child 9576
be9f8e7e42e0
equal deleted inserted replaced
9499:dd389c57c2f0 9500:5771348ded12
7 Module implementing an exporter for PDF. 7 Module implementing an exporter for PDF.
8 """ 8 """
9 9
10 # This code is a port of the C++ code found in SciTE 1.74 10 # This code is a port of the C++ code found in SciTE 1.74
11 # Original code: Copyright 1998-2006 by Neil Hodgson <neilh@scintilla.org> 11 # Original code: Copyright 1998-2006 by Neil Hodgson <neilh@scintilla.org>
12
13 from dataclasses import dataclass
12 14
13 from PyQt6.Qsci import QsciScintilla 15 from PyQt6.Qsci import QsciScintilla
14 from PyQt6.QtGui import QColor, QFontInfo 16 from PyQt6.QtGui import QColor, QFontInfo
15 17
16 from eric7 import Preferences 18 from eric7 import Preferences
48 "Letter": (792, 612), 50 "Letter": (792, 612),
49 "A4": (842, 595), 51 "A4": (842, 595),
50 } 52 }
51 53
52 54
55 @dataclass
53 class PDFStyle: 56 class PDFStyle:
54 """ 57 """
55 Simple class to store the values of a PDF style. 58 Simple class to store the values of a PDF style.
56 """ 59 """
57 60
58 def __init__(self): 61 fore: str = ""
59 """ 62 font: int = 0
60 Constructor
61 """
62 self.fore = ""
63 self.font = 0
64 63
65 64
66 class PDFObjectTracker: 65 class PDFObjectTracker:
67 """ 66 """
68 Class to conveniently handle the tracking of PDF objects so that the 67 Class to conveniently handle the tracking of PDF objects so that the

eric ide

mercurial