Questions tagged [documentviewer]

A WPF UI control that can host paginated FixedDocument content such as an XpsDocument.

A WPF UI control that can host paginated FixedDocument content such as an XpsDocument.

You can read more about the DocumentViewer on Docs.

185 questions
35
votes
1 answer

wpf DocumentViewer - get ITextPointer by GlyphRun and vice versa

Just wondering whether anybody has tried to hack into WPF DocumentViewer in order to make it more useful. I've spent almost a week already trying to create more powerful API for this control based on it's methods which I extract using reflection. …
Snowbear
  • 16,924
  • 3
  • 43
  • 67
18
votes
2 answers

Setting PageOrientation for the Wpf DocumentViewer PrintDialog

Using the Wpf DocumentViewer control I can't figure out how to set the PageOrientation on the PrintDialog that the DocumentViewer displays when the user clicks the print button. Is there a way to hook into this?
Mike Fagan 2dot0
15
votes
7 answers

WPF: How can I remove the searchbox in a DocumentViewer?

My XAML code is like this:
Cheeso
  • 189,189
  • 101
  • 473
  • 713
13
votes
2 answers

What is Alef Hamza?

I found this one, in the Find box (as Search criteria) of the document viewer. What is supposed to match?
OrElse
  • 9,709
  • 39
  • 140
  • 253
11
votes
4 answers

WPF: FixedDocument in Visual Studio 2008 Designer

It's a well-known bug that Visual Studio shows an error when you try to construct a FixedDocument in XAML. For example, the following snippet
Heinzi
  • 167,459
  • 57
  • 363
  • 519
10
votes
0 answers

Add header and footer to XPS print output

XpsDocument is loaded from disk Create a FixedDocumentSequence via XpsDocument.GetFixedDocumentSequence Method () Display the via a DocumentViewer Would like to add to add header and footer to print I don't need to add the header and footer back…
paparazzo
  • 44,497
  • 23
  • 105
  • 176
10
votes
6 answers

WPF DocumentViewer doesn't release the XPS file

I am working on a WPF application that opens and displays XPS documents. When the application closes, the specification is the application should delete the opened XPS document for clean up. However, when opening a certain XPS document, the…
bjutus
9
votes
2 answers

How do I get WPF's DocumentViewer to release its file lock on the source XPS Document?

After showing an XPS file in the WPF DocumentViewer, and closing the DocumentViewer instance, the XPS file is locked and I cannot delete it. I need to release the lock on the XPS file so I can delete it, write another one with the same name, and…
Tim Erickson
  • 2,323
  • 2
  • 22
  • 27
8
votes
1 answer

WPF DocumentViewer - Print with no confirmation

I have a WPF application where I use a document viewer. I also start printing programmatically with documentviewer.Print(); However, when that is pressed it brings up the screen with the Windows printers and makes the user have to click "OK" again…
Unknown Coder
  • 6,625
  • 20
  • 79
  • 129
7
votes
4 answers

Disabling text selection in DocumentViewer

Simple question. How do you disable the text selection of DocumentViewer in WPF? This is the feature where an XPS document is displayed by the viewer and then text can be highlighted via mouse. The highlighted text can also be copied but I have…
bjutus
7
votes
2 answers

WPF DocumentViewer Find-function and FixedPage documents

.Net contains a nice control called DocumentViewer. it also offers a subcontrol for finding text in the loaded document (that's at least what it is supposed to do). When inserting FixedPage's objects as document source for the DocumentViewer, the…
Joachim Kerschbaumer
  • 9,695
  • 7
  • 49
  • 84
7
votes
2 answers

How do you hide a WPF DocumentViewer's menu bars?

At the moment I have a DocumentViewer in a WPF window that displays an XPS file. I have created my own "Next Page" and "Previous Page" buttons and have set the DocumentViewer.Background property to be completely transparent. All that is left of the…
Siyfion
  • 416
  • 1
  • 6
  • 17
7
votes
1 answer

Displaying an XPS document in Document Viewer

I'm having a go with document viewer and XPS atm as I haven't tried it before. So I have a simple piece of code loading an XPS document and displaying it in the document viewer, however the document doesn't appear. The document viewer loads and a…
SumGuy
  • 491
  • 5
  • 8
  • 22
6
votes
3 answers

Set language of the DocumentViewer to German (from code, not XAML)

I am trying to change the language of the DocumentViewer from default English to German but with no success. Being new to WPF, I really struggle to do this. IMPORTANT: DocumentViewer is created in code behind, in response to the menu item click, and…
AlwaysLearningNewStuff
  • 2,939
  • 3
  • 31
  • 84
6
votes
3 answers

WPF DocumentViewer override Print button

I have implemented print preview functionality within my application using a custom DocumentViewer (shown below). I call PrintDialog.ShowDialog() before showing the preview so as to correctly create the document based on paper orientation. The…
BrianKE
  • 4,035
  • 13
  • 65
  • 115
1
2 3
12 13