Open godomainz opened 2 years ago
hello whene i change this line
loader.load(QUrl(url))
to
loader.load(QUrl('https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-after'))
It kinda do what you want to do But I suggest using the print function that you can see what are you converting to pdf before you doing it
hello whene i change this line
loader.load(QUrl(url))
to
loader.load(QUrl('https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-after'))
It kinda do what you want to do But I suggest using the print function that you can see what are you converting to pdf before you doing it
I think you are mistaken. I want to add extra page breaks for the output pdf
I'm not sure if I understand what you want exactly, but if you want to make it look like a pdf file with multiple page maybe try this
layout.setPageSize(QPageSize(getattr(QPageSize, "A4")))
layout.setOrientation(getattr(QPageLayout.Orientation, "Portrait"))
#layout.setPageSize(QPageSize(QRectF(13, 20), QPageSize.Unit.Inch, "4x6 in page", QPageSize.SizeMatchPolicy.ExactMatch))
#layout.setOrientation(QPageLayout.Portrait)
I have a python code like this which converts url to pdf
I want to add page breaks to that pdf using my python code
mainly these two
https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-after
https://developer.mozilla.org/en-US/docs/Web/CSS/break-after
is it possible to add page breaks in my python code to the output pdf?