xps

VB.NET PrintDialog Print to file

别说谁变了你拦得住时间么 提交于 2019-12-11 13:28:16
问题 I am using .NET (VB) Graphics to print/preview reports in a pre-defined format (like tax forms), which works just fine. I would also like to be able to have the ability to accumulate one or more different reports and save them to a file for later conversion to PDF or to use the XPS print driver to print them. When I check the "print to file" box (for a regular laser printer or the XPS print driver), and click "Print", I do not get an Open File dialog as this article suggests I should ( http:/

Displaying Office documents in Silverlight

本小妞迷上赌 提交于 2019-12-11 04:32:22
问题 I've got a need to display Office documents in a browser-based Silverlight application. The solution that I've got in place right now involves using Office Automation to convert the various Office docs to XPS, and then displaying the resulting XPS files in Silverlight with the FirstFloor Document Toolkit for Silverlight. This works, but it's slow, and has a fair number of moving parts. Most notably, the Office Automation piece is particularly unstable, for all the known and obvious reasons.

XpsDocument GetFixedDocumentSequence return null for files generated by a specific computer

牧云@^-^@ 提交于 2019-12-10 18:53:31
问题 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". It returns null with files generate from a specific computer. It does so even when the application is running on the specific computer. But it is working fine with file generated by other computer. When trying to open the file with XPS document

Generating XPS document from a Web Application

不羁的心 提交于 2019-12-10 17:49:19
问题 I hwas trying to generate a multi page XPS document from a web application and trying to stream that ona button click. public class Class1 { protected void btnGenerateLetter_OnClick(object sender, EventArgs e) { try { string sid = Request.Form["id"]; byte[] bytes = FlowDocumentToXPS(GenerateLetter(), 640, 800); Response.Clear(); Response.ContentType = "application/vnd.ms-xpsdocument"; Response.AddHeader("Content-Disposition", "attachment; filename=document.xps"); Response.OutputStream.Write

Appending an XPS document to an existing one

一曲冷凌霜 提交于 2019-12-08 05:16:12
问题 Guys, here's where I am stuck. I have a need to create a single XPS file from a huge bunch of tiny XPS files. The problem is that I keep running out of memory when I try to do this. I present below the code (taken from MSDN), but essentially all it does is this: It reads each tiny XPS file Extracts the pages from it. Adds these pages to a FixedDocumentSequence. When all docs are done, it writes this sequence out to the combined XPS doc. IMO, my FixedDocumentSequence is getting too big. So, I

WPF - example of creating XPS document that is NOT from Visual

无人久伴 提交于 2019-12-08 04:54:54
问题 I'm looking for a reporting/printing solution that does not involve RDLC/SSRS. I'd like to use the DocumentViewer, which I know supports XPS. I have found plenty of examples that use Visual to XPS but I haven't found many examples where I can take an existing WPF page, with various controls like labels, listboxes, grids, etc and create that into an XPS document. Is there a code example out there that takes an entire XAML page and creates XPS? 回答1: It's not trivial, the basic problem here is

WPF DocumentViewer loses custom style after internal link use

烈酒焚心 提交于 2019-12-08 04:52:50
问题 Hi want to build a small application, that allows to navigate through filesystem and displays several documents. One type of document i want to show, is xps. DocumentViewer is doing well. In combination with a Frame the viewer can handle internal links (included in the xps documents.). For my Application i build a custom toolbar (zoom, page, fitsize ...), to have a one toolbar for every kind of document. So i needed to remove the toolbar of the documentViewer. Below is the code. <Style x:Key=

WPF printing of multiple pages with preview

ぐ巨炮叔叔 提交于 2019-12-07 09:01:26
问题 The more I read about the subject the less I understand so apologies in advance if the below seems completely off the wall. I have a usercontrol that contains a flowdocument - a view with a corresponding viewmodel. The aim is to send this to a preview window where the user can view the document and also print it. I lifted some code from an example at http://www.eggheadcafe.com/tutorials/aspnet/9cbb4841-8677-49e9-a3a8-46031e699b2e/wpf-printing-and-print-pr.aspx When the below is called Public

Is there a way to use a ODTTF font file in my WPF app?

情到浓时终转凉″ 提交于 2019-12-07 06:30:23
问题 When an XPS file is created, it subsets and obfuscates the original document's fonts as ODTTF font files, and bundles them in the XPS file (which is just a zip file, so they are easily extracted.) I've extracted one of these ODTTF files, and included it as a Resource in my WPF app. I'm now trying to use it as the FontFamily of a TextBlock. I tried various URI strings to reference the ODTTF font in my XAML, but I can't get it to work at all. (I can get a regular TTF file to work, just not an

Appending an XPS document to an existing one

我与影子孤独终老i 提交于 2019-12-06 15:30:48
Guys, here's where I am stuck. I have a need to create a single XPS file from a huge bunch of tiny XPS files. The problem is that I keep running out of memory when I try to do this. I present below the code (taken from MSDN), but essentially all it does is this: It reads each tiny XPS file Extracts the pages from it. Adds these pages to a FixedDocumentSequence. When all docs are done, it writes this sequence out to the combined XPS doc. IMO, my FixedDocumentSequence is getting too big. So, I am thinking, that maybe I can do this piece by piece - i.e. append the tiny XPS docs to the combined