objective c - Use Page Width when printing NSTableView instead of the view width -
this seems should simple...
i have basic nstableview in window. window arbitrarily resizable (width + height). tableview pinned edges of window , has single column contains view-based table rows. table rows have content pinned left , right edges of cells, resize width of window, adjusting how white space in middle of cell.
i'm trying implement printing tableview. when set nsprintoperation, i'm passing tableview subclass view print. desired result this: want width of tableview resized width of page (regardless of how wide window right on screen). don't want adjust scaling factor (because affects width + height) - want result if manually resized window match width of printed page , hit "print".
i've tried setting horizontalpagination .fitpagination - problem there seems apply scaling factor width + height (which means if window "very wide", makes row height small compensates width).
i've tried overriding adjustpagewidthnew:left:right:limit: in tableview subclass - never gets called.
i suppose create duplicate tableview , re-set 1 have on screen, feels overkill when view want go - need temporarily resize width while i'm printing.
any ideas?
Comments
Post a Comment