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

setPageFormat() #715

Open
webmarco78 opened this issue Apr 25, 2024 · 4 comments
Open

setPageFormat() #715

webmarco78 opened this issue Apr 25, 2024 · 4 comments

Comments

@webmarco78
Copy link

is there a method similar to setPageOrientation() that let you set page format not using the constructor?

@d-javu
Copy link

d-javu commented Apr 25, 2024

That's what AddPage() and startPage() is for, isn't it?

@webmarco78
Copy link
Author

I've seen that setPageFormat() is what I need but it is not public anymore (see changelog)

@d-javu
Copy link

d-javu commented Apr 26, 2024

AddPage($orientation, $format, ...) calls startPage($orientaion, $format, ...) which in turn calls _beginpage($orientation, $format). This last function calls setPageFormat() depending on circumstance.

Specify the correct orientation (P/L PORTRAIT/LANDSCAPE) and format (A4/A5, etc.) when adding a new page to your document.

If I'm being stupid, please specify your use-case in more detail, so I can work out what you are trying to achieve.
I'm quite certain that you are not trying to change the page format in the middle of writing out a page, so I don't understand why you need to call it directly, and not just specify the required orientation/format at the time of adding a new page.

@webmarco78
Copy link
Author

I am using a "framework" that partly uses tcpdf for pdf generation.
It is a long and boring explaination.
The framework developer will implement a parameter for page format that he will add and use when calling the tcpdf constructor.
I just asked if in the meantime does exist a method for page format setting since setPageFormat is not publicc

Thank you

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