![]() ![]() JobData.OutputDocumentFileName = "output. JobData.DocumentFormat = DocumentFormat.Pdf In addition to this, if a user does not want to migrate all XPS/ OXPS files from a folder, then one can export selective XPS documents to PDF format also. Open the registry editor - go to Run (Windows menu + R), type regedit.exe in the Open field and click OK. The XPS format was created by Microsoft a long time ago as an alternative to Adobes popular PDF format but never managed to establish itself as an alternative. The printer enables you to create XPS documents that use the. Solution: Create a feature-specific registry key on Windows Quit Acrobat application if it's already running. Microsoft XPS Document Writer is a printer that is installed on all recent versions of the Microsoft operating system by default. JobData.InputDocumentFileName = "input.xps" Introduction: This article contains code that can be used to print worksheets or entire workbooks to a PDF file, using Microsofts free Save as PDF or XPS. A user can choose complete folder from the left pane and click on the Export button to batch print XPS files to PDF. If you still want to enable the ability to convert XPS files to PDFs, create a registry key (Windows) as mentioned below. Var jobData = new DocumentConverterJobData() Click on the green Add File (s) button, located in the main toolbar to open the file finder window. Install-Package -Version 21.0.0.2 using (DocumentConverter documentConverter = new DocumentConverter())ĭocumentConverter.SetDocumentWriterInstance(new DocumentWriter() ![]() So you could use the toolkit to simply load an XPS and save it out as a PDF quite easily with the following code and nuget package: You can check out the LEADTOOLS SDK (disclaimer: I am an employee of this vendor) which actually supports loading and saving XPS files in C# so you do not need to use a printer to do the conversion, you can simply do it directly in your application: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |