Hi there,
.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 find-functionality just does not find anything. Not even single letters. I haven...
What is the best way to display and print XPS files in a Windows Forms application?
...
The following code snippet illustrates a memory leak when opening XPS files. If you run it and watch the task manager, it will grow and not release memory until the app exits.
'** Console application BEGINS.
Module Main
Const DefaultTestFilePath As String = "D:\Test.xps"
Const DefaultLoopRuns As Integer = 1000
Public Sub ...
My printer ran out of black toner and I didn’t have a spare, so I thought it’d be a good idea to “print” documents to .XPS files for now, then print them when the new toner arrives.
So, now I have my toner but I can’t work out how to print the files. I found this great post on Tim Barcz’s blog which seems to indicate I’m not alone: http...
Hi all,
I've got a WinForms .Net app that runs over a lot of XPS documents (thousands) and during this run the number of handles (according sysinternals process monitor and task manager) increases by between 3-10 for each document. I heavily suspect that these are handles that are opened and not closed by the MS .Net XPS framework libra...
I'm trying to print to Dot Matrix printers (various models) out of C#, currently I'm using Win32 API (you can find alot of examples online) calls to send escape codes directly to the printer out of my C# application. This works great, but...
My problem is because I'm generating the escape codes and not relying on the windows print syste...
hello!
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 application throws an exception that the file is still in use when it tries to delete it. ...
I've got a WCF service as middle tier, and on some occasions I need to create a printable document, store it for future reference in the database, and return it to the client.
My first choice as file format was XPS, so I'd like to create an XPS document in a WCF service, store it, and return it.
Is there an easy way to achieve this, or...
I'd like to create an XPS document for storing and printing.
What is the easiest way to create an XPS document (for example with a simple grid with some data inside) in my program, and to pass it around?
...
I've got a XAML FlowDocument containing a table with a lot of rows, spanning multiple pages, and I'm converting this FlowDocument to XPS.
Now I'm looking for a way to repeat the header of the table on each page.
I see two possible approaches:
1) Get the table to automagically print the header on each page.
2) Somehow by program find...
Hello!
I would like to ask if there are any other alternatives, aside from DocumentViewer, for displaying an XPS document in a WPF application? A ready-to-use control or class in .NET if possible.
This is because DocumentViewer is a little slow when you are scrolling through the pages.
Thanks!
...
Is there a viewer object or ActiveX control I can use to embed an XPS document, or an XAML GUI in my .NET application?
...
Update!
Binding works. The issue is that the XpsDocumentWriter doesn't properly write the first page of the first document of a FixedDocumentSequence. This seems to be an issue encountered by lots of people doing this sort of thing (i.e., five developers worldwide). The solution is slightly odd. I include it as an answer.
Okay, i...
Hello!
In WPF, I have tried passing the markup of an XPS file's FixedPage to a control that has the Content property (ex. Button.Content = XamlReader.Load()).
Example of FixedPage markup:
<FixedPage Width="816" Height="1056" xmlns="http://schemas.microsoft.com/xps/2005/06" xml:lang="und">
<Path Data="M 115.52,132.48 L 704.64,132....
Can I take an Existing WPF (XAML) Control, databind it and turn it into an XPS document that can be displayed and printed using the WPF XPS Document Viewer?
If so, how?
If not, how should I be doing ‘reporting’ in WPF using XPS/PDF/etc?
Basically I want to take an existing WPF control, databind it to get useful data into it and then m...
Currently I have an XPS document whose width is too large for the paper. I would like it to print the clipped off contents on additional pages. I have not been successful at finding a setting to accomplish this.
Any ideas for a solution?
...
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 correctly in the Viewer as Landscape.
Its just that when you hit the print button the Print Dial...
Hi,
I am trying to integrate silverlight into my ASP.NET app, and want to let my users view any arbitrary XPS document in my wep app.
I am looking for any robust Silverlight XPS viewer control for this purpose. I have read some blogs on the "simple xps" viewer and all that, but the best one i have seen so far uses textblock to render t...
I have an existing XPS file that I would like to use as a template and possibly bind data to it. I have tried several methods, but cannot seem to get it to work.
Does anyone have any experience altering an existing XPS file to add data at runtime and then print or save?
Any help is appreciated.
...
I've using the WPF DocumentViewer control to display an XPS Document like so:
viewer.Document = xpsDocument.GetFixedDocumentSequence();
When the print button inside the document viewer is clicked everything prints okay, however the name of the print job is System.Windows.Documents.FixedDocumentSequence, which is less than ideal.
How ...