Questions tagged [xpsdocument]

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

113 questions
4
votes
1 answer

saving a FlowDocument to disk as an XPS document

now the Window containing the FlowDocumentReader which contains my FlowDocument that I want to convert is loaded on the screen , it has a button there , I want when clicking on this button , to save my FLowDocument to disk as an XPS , using Package…
Musaab
  • 805
  • 2
  • 13
  • 30
4
votes
1 answer

Set file name in "Microsoft Print to PDF" printer using System.Print

I want to save an IDocumentPaginatorSource, e.g. FixedDocument or XpsDocument, as a PDF by using the virtual printer "Microsoft Print to PDF": var printServer = new System.Printing.PrintServer(); var queue = printServer.GetPrintQueue("Microsoft…
Sebastian Negraszus
  • 11,915
  • 7
  • 43
  • 70
4
votes
1 answer

How to read an XPS (Fixed page) file and show in UI using Silverlight

I am trying to read an XPS file and show it using Silverlight. I don't have much experience with Silverlight but I have WPF knowledge. How do I view an XPS (Fixed Document) in Silverlight? I am able to view XPS(Fixed Document) in WPF, but not in…
SharpUrBrain
  • 3,180
  • 5
  • 38
  • 56
4
votes
1 answer

Merging XPS files leaves open file handles to document references

I am merging XPS files via an IIS web application but during the merging process, it leaves the document reference file handles open. In a Windows WPF or console application, I wouldn't worry about the handles as they would get released after the…
Cameron Tinker
  • 9,634
  • 10
  • 46
  • 85
4
votes
0 answers

Access oxps (OpenXPS) document in .NET

WPF has System.Windows.Xps.Packaging.XpsDocument to access a simple .XPS file. Does any equivalent exist for an OXPS modification? I tried opening .oxps file using XpsDocument, it doesn't work.
SharpAffair
  • 5,558
  • 13
  • 78
  • 158
4
votes
1 answer

How to add multiple fpages to fixed document in xps?

My requirement is to create xps document which has 10 pages (say). I am using the following code to create a xps document. Please take a look. // Create the new document XpsDocument xd = new XpsDocument("D:\\9780545325653.xps",…
Shafiq Abbas
  • 484
  • 1
  • 5
  • 18
3
votes
2 answers

XPS to Word 2007

Is there a way to convert XPS to Word or RTF using VB.NET?
user120196
3
votes
1 answer

How to set permission in a XPS Document?

I need to secure a XPS Document in C#, but I dont find any Library, please help me... Thanks.
Javier
  • 150
  • 3
  • 8
3
votes
4 answers

Default Layout Orientation when printing XPSs using the WPF XPS Viewer

Is there a way to set the Default Layout Orientation when printing XPSs using the WPF XPS Viewer? My fixed document XPS has its page orientation set to Landscape, the Page Media Size has a width that is longer that its height and it displays…
Scott
  • 4,113
  • 6
  • 37
  • 49
3
votes
0 answers

Printing a UserControl that uses OnLoaded for rendering

I'm trying to print a WPF UserControl that I am creating in code. I am doing this with the DocumentPaginator implementation at the end of the post. The problem I have is that the DocumentPage class is not calling Loaded on my UserControl so the…
vanja.
  • 2,532
  • 3
  • 23
  • 39
3
votes
2 answers

XpsDocument GetFixedDocumentSequence return null for files generated by a specific computer

Solidworks generate "EDRWX" files. Usually, those are opened with Microsoft XPS viewer. Issue : An application use .net XPSDocument to open them and do some manipulation with them before printing. The faulting method is "GetFixedDocumentSequence".…
AXMIM
  • 2,424
  • 1
  • 20
  • 38
3
votes
1 answer

Can I use XpsDocument class in a Windows Form app

I'm trying to convert an XPS document to a BMP so that a C# Windows Forms app using MODI can read it, because my understanding is that MODI cannot read XPS files, only .tif and .bmp I can't seem to locate the XpsDocument class. Can anyone tell me…
Chris
  • 223
  • 1
  • 2
  • 4
3
votes
0 answers

How do I prevent the XPSDocumentWriter from rasterizing my VisualBrush?

I use the following code to create an XPS document from a FixedDocument. using (XpsDocument doc = new XpsDocument(package,CompressionOption.NotCompressed)) { XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(doc); …
tillerstarr
  • 2,616
  • 1
  • 21
  • 35
3
votes
1 answer

XpsDocument ignores my height settings

I am facing a problem when I try to declare a PageHeight on an XPS Document. My code so far looks like this: private FixedDocumentSequence GetDocument(DocumentPaginator paginator) { FixedDocumentSequence document = null; string tempFileName…
Rand Random
  • 7,300
  • 10
  • 40
  • 88
3
votes
1 answer

new XpsDocument(string, FileAccess) fails with "File contains corrupted data", even though the file is not corrupt

I am dealing with a SQLCE database in which one of the tables has an image type column which stores the raw binary data of an XPS document. I am reading this data into a byte[], and then saving it to disk as follows: File.WriteAllBytes(myPath,…
Ross
  • 4,460
  • 2
  • 32
  • 59