Questions tagged [xpsdocument]

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

113 questions
2
votes
0 answers

Text appears reversed when writing a visual with FlowDirection.RightToLeft to an XPS document

I'm writing a WPF FrameworkElement to an XPS document using a custom DocumentPaginator, that breaks the element into DocumentPage instances. The code already works perfectly for English and other languages. To support right-to-left languages, I'm…
kshahar
  • 10,423
  • 9
  • 49
  • 73
2
votes
1 answer

Load XpsDocument from a .XPS file into existing FixedDocument

I'm trying to load a XPS file from disk and print it as part of a FixedDocument or FixedDocumentSequence of in memory documents I've created. They need to be printed as one sequence because they're duplexed. Here's my best attempt so far: // create…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
2
votes
5 answers

What Is The Structure Of a XPS File

As I think, XPS files are like PDF files, but what is the structure od a XPS file? It's like PDF files?
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
2
votes
1 answer

Programmatically render a LocalReport to XPS

I'm trying to render a LocalReport to a XPS file, so I can print them from a Windows Service using the XPS Print API, as it is shown in this article. The problem I find is that I cannot render a local report directly to XPS. Maybe I can render it to…
Federico
  • 576
  • 4
  • 20
2
votes
2 answers

View PowerPoint XML in Android as a bitmap or jpeg or png image

I have many PowerPoint presentations that I need to be able to add to the res folder in my app. They will take up a lot of memory if I do not save them as XML, PDF, or XPS. PDF and android do not come together very easily at all so I choose the path…
CommonKnowledge
  • 769
  • 1
  • 10
  • 35
1
vote
1 answer

Load XPS to documentviewer from embedded resource

i am trying to make help for my application. I have xps documents which i am loading to documentviewer. These files are embedded in resource file. I am able to access these as bytearray. For example …
user1018711
1
vote
0 answers

How can I get and wait for external process to complete?

I have rewritten a paginator to display header and footer for my documents. Everything seems to work until I save it as xps Document : public void SaveAsXps(string fileName, FlowDocument document, string DocumentTitle, string…
Ced
  • 46
  • 1
  • 10
1
vote
1 answer

How to add papsersize to microsoft XPS document Writer by modify .gpd file

I wish to add a new papersize named 'ABC' I Add in mxdwdui.gpd file as follows *Option: ABC { *rcName: =258 *OptionID: 258 *PageDemenssion: PAIR(10000, 10000) *PrintableArea: PAIR(9900, 9900) *PrintableOrigin: PAIR(50, 50) } It meet the Requirements…
1
vote
1 answer

Getting XPS FixedDocumentSequence from a MemoryStream

I'm using the Spire library to convert a DocX file to an XPS file so that I can display a preview of the document in my Windows Desktop (WPF, C#) application. The conversion is fine - and I can save the resulting XPS file to a temporary file…
AJ.
  • 1,621
  • 1
  • 10
  • 23
1
vote
0 answers

How can I check if user has cancelled printing from printing queue?

I am trying to print a WPF component through XPS document writer, There are lots of pages (in 100). It takes lot of time to print. That is why I used Thread.Sleep to simulate that. While printing those pages. User can cancel the print from print…
vgoyal
  • 23
  • 5
1
vote
1 answer

XPSDocumentWriter silent failure

I'm using the XpsDocumentWriter class (MSDN) - specifically using the WriteAsync(FixedDocument) method. Here is the code I am using to call this WriteAsync method: PrintDocumentImageableArea area = null; var xpsDocumentWriter =…
AidanH
  • 502
  • 5
  • 24
1
vote
0 answers

Stop sections from being cut off when xps file is created on WPF

The Application I am working on an EHR application. The page I am working on converts the contents of a XAML file's data to an XPS file which can be printed or drawn on. When the page's data in on the XAML page it can easily be scrolled through and…
Abhi Tiwari
  • 137
  • 1
  • 6
1
vote
1 answer

Tooltip on scrollviewer in documentviewer

I have a documentviewer which i used in my wpf project to show xps document reports of having around 600 pages which is working great. But from user point of view i like to show the current page number as a tooltip on my scrollviewer while dragging…
Rohit Vats
  • 79,502
  • 12
  • 161
  • 185
1
vote
0 answers

Getting "File contains corrupted data" exception while opening the XPSDocument Package

I am getting the exception within my Console Application HResult -2146233033 InnerException null Message File contains corrupted data. Source WindowsBase SourceUri null StackTrace at…
HGMamaci
  • 1,339
  • 12
  • 20
1
vote
1 answer

WPF DocumentViewer enable scroll on touch screen for XPS document

When showing an XPS document in the DocumentViewer control of a WPF application it does not allow you to scroll its content on a touch enabled tablet just my moving your fingers over the screen. Instead it selects the text. The only way of scrolling…
juFo
  • 17,849
  • 10
  • 105
  • 142