Questions tagged [xpsdocument]

XPSDocument is a class that renders XPS documents in WPF (Windows Presentation Foundation)

113 questions
0
votes
0 answers

Print a XpsDocument result in a corrupted PrintDialog

I have an issue with the printing of XPS documents. The first print works correctly but then the print dialog and the prints appears corrupted as you can see in that image. I tried to use other overloads of the Write function such as the one using a…
0
votes
2 answers

DocumentMap/Table of Contents for DocumentViewer, and calling a hyperlink by name or link number for XPS documents

I have XPS files with header bookmarks. If you open the source document in Word and go to view->Document Map, you see all of the bookmarks on the left. Is it possible to get this same functionality in DocumentViewer, like you would get with a PDF…
Kizaru
  • 2,443
  • 3
  • 24
  • 39
0
votes
1 answer

Integrating a WPF control in WinForms without allowing access to other WPF controls?

I need the DocumentViewer WPF control (for XPS files) in a Windows Form application. This is actually simple, but I'm not allowed to link in WPF assemblies. My boss' reasoning is that people will start using WPF controls which are incompatible with…
Kizaru
  • 2,443
  • 3
  • 24
  • 39
0
votes
1 answer

Extract texts from xps document to textbox

I keep running in to this code when researching, however copying this to my form gives me an error in the documentViewerElement part saying The name 'documentViewerElement' does not exist in the current context XpsDocument _xpsDocument=new…
crimson
  • 221
  • 1
  • 7
  • 25
0
votes
1 answer

Add clickable link to XpsDocument

How can I add a clickable link to XpsDocument? Is it possible?
CSharpered
  • 53
  • 5
0
votes
1 answer

WPF to XPS Very Slow

Hello We are trying to create a custom template system based such as WPF Header and Footer elements, with a canvas for 2D Drawings for export to PDF. The problem is the XpsWriter takes about 7 seconds to write the XPS Document, and another 3 Seconds…
Tim Davis
  • 524
  • 6
  • 17
0
votes
2 answers

Failed to correctly exports wpf view to xps if the data is "too many"

THE PROBLEM So, I am building my application so it's view can be exported into and Xps document. The application is literally just an ItemsControl of a UserControl. It works fine until I add some more data to the ItemsControl, the exported file is…
Moses Aprico
  • 1,951
  • 5
  • 30
  • 53
0
votes
1 answer

Generating XPS document from a Windows Application

I want to capture the html content in web browser and print to XPS Document. I am using a Windows application to do it since it is used in IE toolbar. Is there a way to capture the httpwebrequest to read the content of the webpage to to a…
0
votes
1 answer

XpsSignatureDefinition.SpotLocation - How does it work?

How does the SpotLocation work? The following code will not display digital signature request(DSR) on the fixed page at the spot location. Should the DSR automatically appear at the spot location on the page, or do I have to define the signature…
psabela
  • 324
  • 1
  • 3
  • 16
0
votes
1 answer

WPF and XPS: Empty Document Viewer

byte[] mediaBytes = Convert.FromBase64String("<>"); XpsDocument doc; ms = new MemoryStream(mediaBytes, 0, mediaBytes.Length); Uri DocumentUri = new Uri("pack://document.xps"); using (Package…
xscape
  • 3,318
  • 9
  • 45
  • 86
0
votes
0 answers

Merging XpsDocument for printing

I have an wpf application working on print function for merging multiple xps documents as single. when working it triggers error as "Cannot perform a read operation in write-only mode." I have load data from memorystream xpsDoc = new…
0
votes
0 answers

Reading XPS document not working

I have been following this answer in trying to read text from an XPS document. I have the following code: string filePath = @"C:\A.xps"; XpsDocument _xpsDocument = new XpsDocument(filePath, System.IO.FileAccess.Read); …
Felix
  • 3,783
  • 5
  • 34
  • 53
0
votes
1 answer

XamlReader of XPS files throws cannot find resource

I trying to read in a XPS file with XamlReader.Load ( XMLReader ). Some XPS files read in and I can walk through perfectly. One of the XPS files I am working, that displays correctly in IE, gives the following exception: Cannot convert string…
kenny
  • 21,522
  • 8
  • 49
  • 87
0
votes
0 answers

WPF: Create XpsDocument Pagination

I am trying to create a Paginator that will in turn create an XpsDocument that I can preview with the and then print. I have the following code that I found on the web but do not understand how it is working. The issue I am having is that if I…
BrianKE
  • 4,035
  • 13
  • 65
  • 115
0
votes
1 answer

WPF Visual to XPS document method creates only one page

I have a WPF Window that I want to save to an XPS file (or really, any type of file that would store the window image). This window contains a lengthy DataGrid. So far I am able to write to an XPS file, but the resulting document contains only one…
Tekito
  • 840
  • 8
  • 24