diff -r e440aaf179ce -r 64157aeb0312 src/eric7/QScintilla/Exporters/ExporterPDF.py --- a/src/eric7/QScintilla/Exporters/ExporterPDF.py Wed Dec 20 19:28:22 2023 +0100 +++ b/src/eric7/QScintilla/Exporters/ExporterPDF.py Thu Dec 21 12:03:40 2023 +0100 @@ -74,7 +74,8 @@ """ Constructor - @param file file object open for writing (file) + @param file file object open for writing + @type file """ self.file = file self.offsetList = [] @@ -84,7 +85,8 @@ """ Public method to write the data to the file. - @param objectData data to be written (integer or string) + @param objectData data to be written + @type int or str """ if isinstance(objectData, int): self.file.write("{0:d}".format(objectData)) @@ -95,8 +97,10 @@ """ Public method to add a new object. - @param objectData data to be added (integer or string) - @return object number assigned to the supplied data (integer) + @param objectData data to be added + @type int or str + @return object number assigned to the supplied data + @rtype int """ self.offsetList.append(self.file.tell()) self.write(self.index) @@ -111,7 +115,8 @@ """ Public method to build the xref table. - @return file offset of the xref table (integer) + @return file offset of the xref table + @rtype int """ xrefStart = self.file.tell() self.write("xref\n0 ") @@ -166,8 +171,10 @@ """ Public method to convert the font size to points. - @param thousandths font size (integer) - @return point size of the font (integer) + @param thousandths font size + @type int + @return point size of the font + @rtype int """ return self.fontSize * thousandths / 1000.0 @@ -175,8 +182,10 @@ """ Public method to set a style. - @param style_ style to be set (integer) - @return the PDF string to set the given style (string) + @param style_ style to be set + @type int + @return the PDF string to set the given style + @rtype str """ styleNext = style_ if style_ == -1: @@ -292,8 +301,10 @@ """ Public method to add a character to the page. - @param ch character to add (string) - @param style_ number of the style of the character (integer) + @param ch character to add + @type str + @param style_ number of the style of the character + @type int """ if not self.pageStarted: self.startPage() @@ -410,8 +421,10 @@ """ Constructor - @param editor reference to the editor object (QScintilla.Editor.Editor) - @param parent parent object of the exporter (QObject) + @param editor reference to the editor object + @type QScintilla.Editor.Editor + @param parent parent object of the exporter + @type QObject """ ExporterBase.__init__(self, editor, parent) @@ -419,8 +432,10 @@ """ Private method to convert a color object to the correct PDF color. - @param color color object to convert (QColor) - @return PDF color description (string) + @param color color object to convert + @type QColor + @return PDF color description + @rtype str """ pdfColor = "" for component in [color.red(), color.green(), color.blue()]: