Questions tagged [documentpaginator]
24 questions
11
votes
0 answers
How use a DocumentPaginator asynchronously via GetPageAsync with XpsDocumentWriter?
The idea here is that I have a DocumentPaginator that I want to use with an XpsDocumentWriter or PrintDialog as both have the option of printing given a paginator. When I use either, i.e. XpsDocumentWriter.Write[Async] or PrintDialog.PrintDocument,…

Faury
- 111
- 3
5
votes
2 answers
How to set the Page Size for an Xps Document?
I am trying to save an XPS document with a FixedDocument. So far, I have failed to change the page size. How can I change it to a custom size?
I have based my code on the first answer to this question, more specifically, I am using this code:
…

O. R. Mapper
- 20,083
- 9
- 69
- 114
4
votes
1 answer
WPF XPS Document doesn't display images anymore
I am using the code below for years but suddenly stop to display images. I made a short version to test it and explain:
There is an UserControl XamlPage which contains only two controls:

Yannick
- 194
- 8
4
votes
0 answers
DocumentPaginator that works with any Visual?
Printing any visual is easy.
Printing one that is larger than a single page is hard.
I'm stuck. The docs are scarce and I've gotten as far as I can.
I'm wondering if anybody has a class which extends DocumentPaginator that can take any visual (or…
user1228
4
votes
2 answers
WPF DocumentPaginator and DocumentPage unexpected cropping
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…

Andrew Bullock
- 36,616
- 34
- 155
- 231
4
votes
1 answer
WPF: Is there a way to use PrintDialog only to select the target printer without having to provide a DocumentPaginator class?
I want to print a very simple layout with PrintDocument that fits on one page, so it doesn't require a DocumentPaginator. However I want to use PrinterDialog to select the printer. I saw examples with PrinterSettings being a property of…

thomiel
- 2,467
- 22
- 37
3
votes
2 answers
Does the WPF DocumentPaginator keep all DocumentPages in memory until it finishes a print job?
Strictly theoretical question concerning WPF's DocumentPaginator:
When using the WPF DocumentPaginator class to print a multi-page document, does the paginator keep all of the DocumentPages it requests over the history of the print job in memory…

Steven D.
- 311
- 4
- 10
2
votes
1 answer
Mix landscape and portrait printing in wpf / c#
In a WPF / C# app, I'm printing some pages by using DocumentPaginator.
However, I want to mix in 1 printjob pages in Landscape and Portrait mode:
e.g., Page 1 in Portrait, Page 2 in Landscape and Page 3 in Portrait.
However, if I change the PageSize…

Robbie
- 715
- 3
- 10
- 18
2
votes
2 answers
Is it possible in WPF to get content of each DocumentPage by page number?
I use DocumentPaginator to divide FlowDocument's text into pages. Is it possible to get content of each pages by page number after ComputePageCount()? If not, how can I do it in other way?
Code:
var flowDocument =…

Jeksonic
- 123
- 8
2
votes
0 answers
WPF FlowDocumentPageViewer
I have custom implementation of DocumentPaginator (include header and footer) and I want to use this paginor in FlowDocumentPageViewer.
How can I do it?
I've tried to implement IDocumentPaginatorSource in my custom DocumentPaginator, but…

user1630263
- 21
- 2
1
vote
1 answer
Paginate using DocumentPaginator from FlowDocument that contains StackPanel
I want to generate paginated documents from FlowDocument object that contains a StackPanel element. I tried using DocumentPaginator.
So far I have tried this code below, but no luck for me, that is, only one truncated page is generated and its…

Rizki Pratama
- 551
- 4
- 23
1
vote
5 answers
Creating WPF components in background thread
Im working on a reporting system, a series of DocumentPage are to be created through a DocumentPaginator. These documents include a number of WPF components that are to be instantiated so the paginator includes the correct things when later sent to…

Mizipzor
- 51,151
- 22
- 97
- 138
1
vote
1 answer
WPF Printing large custom control
I'm sorry if this is a duplicate, but I couldn't find anything relating to it.
I'm trying to create an XpsDocument from a custom control that I have. The custom control already defines properties for a header and a footer, along with the body.
The…

Max v. Steiger
- 178
- 9
0
votes
1 answer
Blank pages when implementing DocumentPaginator
I'm trying to implement a Paginator like this:
public class MyPaginator : DocumentPaginator{
// ommitting details...
public override DocumentPage GetPage(int pageNumber) {
DocumentPage page = new DocumentPage(canvas);
return page;
…

Louis Somers
- 2,560
- 3
- 27
- 57
0
votes
0 answers
How to show an image inside a DocumentPaginator in WPF
I want to create a report in WPF to show a list of information and I want to put a logo image on top of the page. The page can be repetead if the list is over a page height. So i Try to create a header, a footer and a body. Into the header I want to…

Marco76
- 1