TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

setPageFormat()

Open webmarco78 opened this issue 9 months ago • 4 comments

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

webmarco78 avatar Apr 25 '24 12:04 webmarco78

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

d-javu avatar Apr 25 '24 15:04 d-javu

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

webmarco78 avatar Apr 25 '24 16:04 webmarco78

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.

d-javu avatar Apr 26 '24 10:04 d-javu

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

webmarco78 avatar Apr 26 '24 15:04 webmarco78