Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page orientation and no of pages rendered #5

Open
yhelfronda opened this issue May 5, 2017 · 1 comment
Open

Page orientation and no of pages rendered #5

yhelfronda opened this issue May 5, 2017 · 1 comment

Comments

@yhelfronda
Copy link

Hi,

Is is possible to change the orientation? 'cause I want to be the orientation in landscape of A4 paper size. And also does not limit the page rendering into 1 page only. Could it be possible to render more pages?

Thank you.

@katunch
Copy link

katunch commented Mar 4, 2019

to change the orientation you have to fix this line

UIGraphicsBeginPDFContextToData(data, CGRect.zero, nil)

to

UIGraphicsBeginPDFContextToData(data, printPageRenderer.paperRect, nil)

and then you can change the paper size here:

let pageFrame = CGRect(x: 0.0, y: 0.0, width: A4PageWidth, height: A4PageHeight)

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

No branches or pull requests

2 participants