Skip to content

Deprecating .rotate() and introducing .rotation() context manager#161

Open
Lucas-C wants to merge 1 commit into
reingart:masterfrom
Lucas-C:rotation-replace-rotate
Open

Deprecating .rotate() and introducing .rotation() context manager#161
Lucas-C wants to merge 1 commit into
reingart:masterfrom
Lucas-C:rotation-replace-rotate

Conversation

@Lucas-C
Copy link
Copy Markdown

@Lucas-C Lucas-C commented Jul 22, 2020

Minimal Python code reproducng the issue with the current rotate method:

pdf = fpdf.FPDF()
pdf.add_page()
pdf.rotate(90)
pdf.image("lena.gif")
pdf.add_page()
pdf.rotate(90)
pdf.image("lena.gif")
pdf.output("out.pdf")

The generated file contains the following stream:

2 J
0.57 w
Q
q 0.00000 1.00000 -1.00000 0.00000 28.35 813.54 cm 1 0 0 1 -28.35 -813.54 cm
q 128.00 0 0 128.00 28.35 685.54 cm /I1 Do Q

Notice the invalid leading Q operator.

This issue was detected using Datalogics PDF Checker

@Lucas-C
Copy link
Copy Markdown
Author

Lucas-C commented Jan 6, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant