Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 912605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:24:41+00:00 2026-05-15T17:24:41+00:00

I’m trying to print a WPF canvas over multiple pages. I’m perfectly happy with

  • 0

I’m trying to print a WPF canvas over multiple pages.

I’m perfectly happy with scaling it to fit on the page width, then clipping and translating the canvas for each page; all pretty simple maths.

What I don’t understand is how I get the dimensions of the printable area, and how to tell the printer where to print to. Whatever I try it appears the values I’m using are the size of the paper, and i therefore get cropping occurring as the printer cant print right to the edge of the paper.

var capabilities = printDialog.GetPrintCapabilities(dialog.PrintTicket);

capabilities has the following properties:

capabilities.PageImageableArea.ExtentWidth
// "Gets the width of the imageable area"

What is the “imageable” area? is that the area on the paper in which I can put content? I guess so because:

capabilities.PageImageableArea.OriginWidth
// Gets the distance from the left edge of the page to the imageable area.

However what about the bottom and right margins? Where do I find this information?

What should the PageSize property of the DocumentPaginator be set to? Should I set this from capabilities.PageImageableArea? Or does the dialog.Print() function set this, and i just need to read from it in GetPage()?

Finally, when I return a DocumentPage, what do I pass to the three geometry arguments pageSize, bleedBox and contentBox?

Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:24:42+00:00Added an answer on May 15, 2026 at 5:24 pm

    Ok it seems that printing always occurs from (0, 0) (top left) of the paper.

    Get the size of the paper with:

    printDialog.PrintableAreaWidth, printDialog.PrintableAreaHeight
    

    and the top and left margins with:

    var printCapabilities = printDialog.PrintQueue.GetPrintCapabilities(printDialog.PrintTicket);
    printCapabilities.PageImageableArea.OriginWidth, printCapabilities.PageImageableArea.OriginHeight
    

    I assumed that the bottom and right margins were the same as the top and left, although this may not be safe.

    You have to scale and clip the canvas as you normally would, then apply a TranslateTransform the size of your margins to move the content in to the printable area.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.