CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2014
    Posts
    10

    expandToFit & centering page content on printed page XPS API

    Hello,

    The following shows the calculation and application of shrink to fit without centering the page content on the printed page. I use a 3rd party library to create the matrix which is then applied to the XPS_MATRIX.

    I understand that working out where the page should sit on the page requires knowing the media size and the desired size of the printed page, then calculating what the margin will be; BUT I do not understand how to do this calculation for the desired margin so I am asking for clarification on how to apply centering through a calculated margin in both rotations of the page.

    As of right now, this applies shrink to fit, but I also need to figure out expand to fit so I was wondering if anyone can provide insight how to do a calculation for expand to fit as well.

    Thanks for any help, much is appreciated.
    Last edited by PREFETCH0; July 22nd, 2021 at 03:04 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured