Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtPdfCanvas.SetPageSize

procedure SetPageSize(aWidth, aHeight: Double);
THE PAGE SIZE, AND WHY IT CAN ONLY BE SET BEFORE ANYTHING IS DRAWN.

TextOut and HLine convert the caller's top-left y into PDF's bottom-up frame with fHeight at the moment of the call, and SaveToOS writes ONE MediaBox for every page in the file. So a size changed after a mark has been made would move every mark already made, on every page, and there is no record left of what the height was when each was placed. This refuses instead: raises ePdfCanvas when any content exists, and when a side is outside the ISO 32000 limits. Call it first or not at all.