@@ -781,7 +781,8 @@ def rotate(self, angle, x=None, y=None):
781781 Use `rotation` instead.
782782 """
783783 warnings .warn (
784- "rotate() can produces malformed PDFs and is deprecated. Use the rotation() context manager instead." ,
784+ "rotate() can produces malformed PDFs and is deprecated. "
785+ "Use the rotation() context manager instead." ,
785786 PendingDeprecationWarning ,
786787 )
787788 if x is None :
@@ -816,8 +817,8 @@ def rotation(self, angle, x=None, y=None):
816817 Notes
817818 -----
818819
819- Only the rendering is altered. The `get_x()` and `get_y()` methods are not affected,
820- nor the automatic page break mechanism.
820+ Only the rendering is altered. The `get_x()` and `get_y()` methods are not
821+ affected, nor the automatic page break mechanism.
821822 """
822823 if x is None :
823824 x = self .x
@@ -850,12 +851,13 @@ def cell(self, w, h=0, txt="", border=0, ln=0, align="", fill=False, link=""):
850851 txt (str): String to print. Default value: empty string.
851852 border: Indicates if borders must be drawn around the cell.
852853 The value can be either a number (`0`: no border ; `1`: frame)
853- or a string containing some or all of the following characters (in any order):
854+ or a string containing some or all of the following characters
855+ (in any order):
854856 `L`: left ; `T`: top ; `R`: right ; `B`: bottom. Default value: 0.
855857 ln (int): Indicates where the current position should go after the call.
856- Possible values are: `0`: to the right ; `1`: to the beginning of the next line ;
857- `2`: below. Putting 1 is equivalent to putting 0 and calling `ln` just after.
858- Default value: 0.
858+ Possible values are: `0`: to the right ; `1`: to the beginning of the
859+ next line ; `2`: below. Putting 1 is equivalent to putting 0 and calling
860+ `ln` just after. Default value: 0.
859861 align (str): Allows to center or align the text. Possible values are:
860862 `L` or empty string: left align (default value) ; `C`: center ;
861863 `R`: right align
@@ -869,7 +871,8 @@ def cell(self, w, h=0, txt="", border=0, ln=0, align="", fill=False, link=""):
869871 raise FPDFException ("No font set, you need to call set_font() beforehand" )
870872 if isinstance (border , int ) and border not in (0 , 1 ):
871873 warnings .warn (
872- 'Integer values for "border" parameter other than 1 are currently ignored'
874+ 'Integer values for "border" parameter other than 1 are currently '
875+ "ignored"
873876 )
874877 border = 1
875878 page_break_triggered = False
@@ -1026,31 +1029,34 @@ def multi_cell(
10261029 max_line_height = None ,
10271030 ):
10281031 """
1029- Output text with line breaks, cf. https://pyfpdf.github.io/fpdf2/reference/multi_cell.html
1032+ Output text with line breaks, cf.
1033+ https://pyfpdf.github.io/fpdf2/reference/multi_cell.html
10301034
10311035 Args:
10321036 w (int): cells width. If 0, they extend up to the right margin of the page.
10331037 h (int): cells height.
10341038 txt (str): strign to print.
10351039 border: Indicates if borders must be drawn around the cell.
10361040 The value can be either a number (`0`: no border ; `1`: frame)
1037- or a string containing some or all of the following characters (in any order):
1041+ or a string containing some or all of the following characters
1042+ (in any order):
10381043 `L`: left ; `T`: top ; `R`: right ; `B`: bottom. Default value: 0.
10391044 align (str): Allows to center or align the text. Possible values are:
10401045 `L` or empty string: left align (default value) ; `C`: center ;
10411046 `R`: right align
10421047 fill (bool): Indicates if the cell background must be painted (`True`)
10431048 or transparent (`False`). Default value: False.
1044- split_only (bool): if `True`, does not output anything, only perform word-wrapping
1045- and return the resulting multi-lines array of strings.
1049+ split_only (bool): if `True`, does not output anything, only perform
1050+ word-wrapping and return the resulting multi-lines array of strings.
10461051 link (str): optional link to add
10471052 ln (int): Indicates where the current position should go after the call.
1048- Possible values are: `0`: to the bottom right ; `1`: to the beginning of the next line ;
1049- `2`: below with the same horizontal offset ; `3 `: to the right with the same vertical offset.
1050- Default value: 0.
1053+ Possible values are: `0`: to the bottom right ; `1`: to the beginning
1054+ of the next line ; `2 `: below with the same horizontal offset ;
1055+ `3`: to the right with the same vertical offset. Default value: 0.
10511056 max_line_height (int): optional maximum height of each sub-cell generated
10521057
1053- Using `ln=3` and `maximum height=pdf.font_size` is useful to build tables with multiline text in cells.
1058+ Using `ln=3` and `maximum height=pdf.font_size` is useful to build tables
1059+ with multiline text in cells.
10541060
10551061 Returns: a boolean indicating if page break was triggered.
10561062 """
@@ -1330,7 +1336,8 @@ def image(
13301336 Put an image on the page
13311337
13321338 Args:
1333- name: either a string representing a file path to an image, or a instance of `PIL.Image.Image`
1339+ name: either a string representing a file path to an image, or a instance of
1340+ `PIL.Image.Image`
13341341 x (int): optional horizontal position where to put the image on the page
13351342 y (int): optional vertical position where to put the image on the page
13361343 w (int): optional width of the image
@@ -1395,7 +1402,8 @@ def image(
13951402 def ln (self , h = None ):
13961403 """
13971404 Line Feed.
1398- The current abscissa goes back to the left margin and the ordinate increases by the amount passed as parameter.
1405+ The current abscissa goes back to the left margin and the ordinate increases by
1406+ the amount passed as parameter.
13991407
14001408 Args:
14011409 h (int): The height of the break.
0 commit comments