LayoutContext

Vue de l’ensemble

‘LayoutContext’ est une classe dans Aspose.PDF FOSS pour Java.

Trace la position du cursor et les limites de l’espace contenu pendant le layout de page.

Cette classe fournit 16 méthodes pour travailler avec des objets LayoutContext dans les programmes Java. Les méthodologies disponibles comprennent: ‘LayoatContaxt’, ‘advanceCursor’, getAvailableWidth', ‘getContentBottom’, 'getcontentLeft', ’get ContentRight', ‚getCurseX', ''getTursoreY',getPageHeight’ , ‘getPagesWide’, et 4 méthode supplémentaires. Tous les membres publics sont accessibles à toute application Java après l’installation de l’Aspose.PDF FOSS pour le package Java Propriétés: available Wid', contenu bas, contenus 'left' contenant, Right contenue, plus de 4’cursors.

Propriétés

NameTypeAccessDescription
availableWidthdoubleReadReturns the available width of the content area.
remainingHeightdoubleReadReturns the remaining vertical space from the current cursor position
to the bottom of the content area.
cursorXdoubleReadReturns the current horizontal cursor position.
cursorYdoubleReadReturns the current vertical cursor position.
contentLeftdoubleReadReturns the left edge of the content area.
contentRightdoubleReadReturns the right edge of the content area.
contentTopdoubleReadReturns the top edge of the content area.
contentBottomdoubleReadReturns the bottom edge of the content area.
pageWidthdoubleReadReturns the total page width.
pageHeightdoubleReadReturns the total page height.

méthodes

SignatureDescription
LayoutContext(pageWidth: double, pageHeight: double, margins: MarginInfo)Creates a LayoutContext for a page with the given dimensions and margins.
getAvailableWidth()doubleReturns the available width of the content area.
getRemainingHeight()doubleReturns the remaining vertical space from the current cursor position
to the bottom of the content area.
advanceCursor(height: double)Moves the cursor down by the specified height.
resetCursorX()Resets the horizontal cursor to the left edge of the content area.
hasSpace(height: double)booleanReturns whether there is enough vertical space remaining for content
of the given height.
getCursorX()doubleReturns the current horizontal cursor position.
setCursorX(cursorX: double)Sets the current horizontal cursor position.
getCursorY()doubleReturns the current vertical cursor position.
setCursorY(cursorY: double)Sets the current vertical cursor position.
getContentLeft()doubleReturns the left edge of the content area.
getContentRight()doubleReturns the right edge of the content area.
getContentTop()doubleReturns the top edge of the content area.
getContentBottom()doubleReturns the bottom edge of the content area.
getPageWidth()doubleReturns the total page width.
getPageHeight()doubleReturns the total page height.

Voir aussi

  • Aspose.PDF pour Java — API d’entreprise
 Français