Questions tagged [xpsdocument]

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

113 questions
0
votes
1 answer

View XPS with XPS Document API?

How can i view an XPS using the (native Windows 7) XPS Document API? Given an XPS Object Model Package object (IXpsOMPackage), how can i render it to a bitmap or device context? In the way a metafile can be "played" onto a device context, how can i…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
0
votes
1 answer

FixedPage XPS/PDF content in won't fill the page

I've been attempting this for a few hours, and now reluctantly asking for help. I have a WPF Custom Control with a backing view model that I'd like to print to PDF (via XPS). Eventually, there will be multiple pages of these controls. Following…
Andy Stagg
  • 373
  • 5
  • 22
0
votes
1 answer

XpsDocument.SignDigitally throws NullReferenceException on IsSignable

I ran into a problem with the method mentioned in the title. If I try to sign an XPS document, it runs into NullReferenceException: at System.Windows.Xps.Packaging.XpsDocument.get_IsSignable() at…
a_balazs
  • 3
  • 1
0
votes
0 answers

Convert WPF Controls to PDF

I want to convert the WPF Controls view to PDF. I was able to convert it to PDF but it loses its style properties after converting to the PDF. The text is being float to left but I have put it on the center on the WPF Window. XAML Code:
0
votes
1 answer

Can XpsDocuments be serialized to XML for storage in a database?

And, if not, is the only other alternative a blob?
user1228
0
votes
1 answer

XPSDrv Sample Entry Point / Filters Squence

Finally, I managed to build XPSDrv Sample project successfully . But still there is a problem . I need to execute a function ( to start an exe file ) after the xps file has been sent to the printer (in my case to local port). So , where and how can…
0
votes
1 answer

How to convert png to xps?

I tried to convert png to xps. I fallow this answer . My code: XpsDocument xpsDocument = new XpsDocument(@"C:\pathRoot\fileName.xps", FileAccess.ReadWrite); XpsDocumentWriter xpsDocumentWriter =…
mazury
  • 177
  • 1
  • 2
  • 12
0
votes
1 answer

Viewing an XPS document with malformed URI's in WPF

I'm trying to use DocumentViewer (or, more specifically, DocumentViewer's DocumentPageView) to load a presentation that was saved from Powerpoint as XPS. However, the author of the slides was being clever and entered one of his URLs as a…
zpinter
  • 2,232
  • 2
  • 23
  • 29
0
votes
0 answers

How to dispose PdfSharp XpsDocument object while saving WPF window as Pdf?

I'm using PdfSharp to save a WPF Window into a PDF. I'm getting System.OutOfMemoryException when executing the following code:- using (MemoryStream lMemoryStream = new MemoryStream()) { Package package = Package.Open(lMemoryStream,…
0
votes
1 answer

Microsoft XPS Document writer v4

Printing a PrintDocument to file using Microsoft XPS Document Writer in Windows 10 always throw exception 'The handle is invalid'. But in Windows 7 it is working perfectly. The error throws when the PrinterSettings changed to custom page size. No…
Vijayakumar
  • 51
  • 1
  • 9
0
votes
0 answers

Print QR code with XPS document writer instead of the actual TSC ME240 printer

I have an application that prints QR code stickers. It works fine. Now I'm wondering if I can create an XPS document to view the QR code on the monitor before printing it. I tried setting Microsoft XPS Document Writer as the printer in the openport…
Artemis
  • 413
  • 3
  • 10
  • 24
0
votes
1 answer

Embedding XpsDocument PowerPoint slide shows into a WPF DocumentViewer

I've recently had a go at embedding a PowerPoint file as an XpsDocument in WPF. It is a simple WPF application in which I embed a DocumentViewer property into my MainWindow.xaml grid:
AndyUK
  • 3,933
  • 7
  • 42
  • 44
0
votes
1 answer

How to create Editable forms in XPS document (e.g. PDF forms with Textbox controls)?

I want to create a Editable form having TextBox control, the form should be able to submit to a web service, which will then parse the document. Is this possible with XPS document?
None
0
votes
1 answer

VB.Net printing xps file "File contains corrupted data" error

I have an xps file. When I try to print this file directly, I can do it without any error with my below code: Dim defaultPrintQueue = LocalPrintServer.GetDefaultPrintQueue Dim xpsPrintJob As PrintSystemJobInfo = defaultPrintQueue.AddJob("test",…
Gurcan
  • 428
  • 1
  • 8
  • 19
0
votes
0 answers

Xps Documentviewer not running on new thread

I'm trying a new approach to keeping my UI responsive while loading an large xps document. My button click starts my progress bar (loadStatus) I then start a new thread and call my "open and view document" method. The UI runs and the progress bar…