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

Export to a specific size #45

Closed
chaitanya-ramji opened this issue Aug 20, 2016 · 2 comments
Closed

Export to a specific size #45

chaitanya-ramji opened this issue Aug 20, 2016 · 2 comments

Comments

@chaitanya-ramji
Copy link

Is it possible to export the view to a specific size such as Imperial or A4?

@sgr-ksmt
Copy link
Owner

sgr-ksmt commented Sep 7, 2016

@chaitanya-ramji

Sorry for replying late..

you can use PDFPageSize.A4.

let view = ...
view.frame = CGRect(origin: origin, size: PDFPageSize.A4)
do {
    try PDFGenerator.generate(view, outputPath: path)
} catch {
    // ....
}

@sgr-ksmt sgr-ksmt closed this as completed Sep 7, 2016
@haemi
Copy link

haemi commented Nov 19, 2016

but this doesn't scale the pdf, right?

@ghost ghost mentioned this issue Jan 14, 2017
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

3 participants