Both XPS and PDF are used to produce and share finalized documents: resumes, newsletters, invoices, legal documents, financial reports, tax returns and other types of documents. XPS format was meant to replace PDF as a universal standard for documents, but as for now PDF seems to have won this digital war.
Though both formats have pretty much the same functionality, XPS (XML Paper Specification XPS, Open XML Paper Specification, OXPS), compared to PDF (Portable Document Format), seems to be almost dead in the water. If your colleague or friend receives an XPS file from you, they might find it difficult to open or even consider it as malware.
It is possible to convert XPS to PDF in a variety of ways: using offline desktop applications (manually, automatically or in batch mode), using command line interface (CLI), online converters, a virtual printer or a script file.
Contents
The simplest way to convert between XPS and PDF files we can think of is to use a standalone desktop software called DocuFreezer. It takes 3 steps to start the batch conversion process: add XPS documents to the program's list, make basic settings and click "Start". DocuFreezer has an intuitive interface with minimum but useful range of settings. Besides saving to PDF, it also converts multiple XPS files to image formats, such as JPG, TIFF or PNG.
You can export XPS (OXPS) files to PDF just by placing them to a folder with FolderMill. It is a program, which can work 24/7 to convert or print files. It monitors incoming files and automatically processes them once they appear in one of Hot Folders. When your XPS files appear in a Hot Folder's incoming subfolder, the program instantly converts them to PDF. Besides conversion to PDF, you can assign other tasks, such as print, convert to image, copy files, rename files, add watermark or run a script file. The last but not least: FolderMill can work in Windows service mode, so you can set up user-unattended conversion of XPS files to PDF within your company.
A simple way to convert XPS files is using a virtual printer instead of using a converter to PDF. If you don’t have any virtual printer installed yet, try using Universal Document Converter. It can save your XPS to PDF, which can be later printed on a regular printer, if necessary. Universal Document Converter can also save your XPS file as an image file - BMP, DCX, GIF, JPEG, PCX, PNG or TIFF.
The instruction below lets you converting files one by one, however, you can also set up batch conversion to PDF to process multiple files pretty fast. In this case use Universal Document Converter together with Print Conductor.
There's a solution for batch conversion in Windows Command Prompt or Windows PowerShell - software called 2PDF*. It is a professional utility for converting popular office documents and images into the PDF format. The program doesn't have graphical interface, but it has simple standard commands and flexible conversion parameters.
Command line interface lets system administrators and advanced users can take 2PDF into use and adapt it to their company's IT structure. For example, you can call 2PDF from the Windows Task Scheduler, from a batch, cmd or VBScript file. This allows to have your XPS documents changed to PDF without your presence - conversion will be scripted and/or scheduled.
Conversion to PDF can be set with a range of extra parameters by modifying the 2PDF basic command line:
Furthermore, you can add commands related to 2PDF.exe into the source code of the software you are developing or your own existing software. Here's an example set of commands written in C# which can be built into your programming code:
public void convert()
const string sSrcFolder = @"C:\in";
const string sMask = @"*.xps";
const string sOutFolder = @"C:\Out";
string converterPath = @"C:\Program Files (x86)\2PDF\2pdf.exe";
string procArguments = "-src \""+sSrcFolder+"\\"+sMask+"\" -dst \""+sOutFolder+"\" -options alerts:no";
Process process = new Process();
process.StartInfo.UseShellExecute = true;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.WindowStyle = ProcessWindowStyle.Normal;// ProcessWindowStyle.Hidden;
process.StartInfo.FileName = converterPath;
process.StartInfo.Arguments = procArguments;
process.Start();
process.WaitForExit();
process.Close();
process.Dispose();
You can use online converters if you need to occasionally convert such files. There's plenty of websites which offer instant conversion to PDF online. However, we urge you to be careful and be aware that your files may be actually seen or used by someone else. Before using a free online converter, we suggest that you do at least three things:
Before you go with an online solution, remember the risks that you may be exposed in terms of your personal data privacy and safety of your files. If the prospect of recently implemented GDPR (General Data Protection Regulation), online services must ask your consent to collect, store and process your personal data like full name, home address, location and other data. If an online service doesn't request for your consent in plain, straightforward language clearly explaining how your data will be used and for how long it will be used and stored, such a service is not GDPR-compliant and does not provide up-to-date user data protection.
We strongly recommend not to upload any sensitive data, since it can be unsafe. Do not upload content such as bank statements, contracts, utility bills - anything which other people can potentially use or abuse. It's better to use services that have been around for a long while. Nevertheless, there's always a risk.
It's better to use services that have been around for a long while. Nevertheless, there's always a risk. We strongly recommend not to upload any sensitive data, since it can be unsafe. Do not upload content such as bank statements, contracts, utility bills - anything which other people can potentially use or abuse.
XPS file format was designed in 2006 by Microsoft as a solution for sharing and archiving documents. XPS was introduced in Windows Vista as an alternative of Adobe PDF format. Microsoft Office 2007 and all newer versions of this software contain ability to export documents to XPS.
Technically, XPS is an XML file markup, containing elements of each page: text, 2D vector graphics, raster images, embedded fonts. This format is similar to PDF with its ability to retain a document’s formatting, allowing you to view the document in its original appearance It has some other features you can find in PDF, such as digital rights management and digital signatures.
XPS files include texts, images, fonts and other elements and technically can be used for business. But if you’re trying to send someone an XPS file, you can bet they’ll be familiar with PDFs but not XPS files. Since this format is less popular and even may be considered as malware by accident (and deleted!), it's better to convert XPS to PDF or convert your XPS to JPG before sending it to your business partner or client.
PDF stands for the Portable Document Format. Developed by Adobe, this format preserves document formatting, displays documents in a digital form independent of the software, hardware or OS they are opened with. In other words, when the PDF format file is viewed online, shared or printed, it keeps the structure and visual appearance that you intended. There are 2 common groups of PDFs which can be distinguished:
One of the drawbacks of both formats is that is difficult to edit and sometimes even extracting information from PDF or XPS files may be challenging. Nevertheless, PDF and XPS files are often present in workflows of many companies nowadays.
Should you have any questions or issues related to converting from XPS to PDF or vice versa, please don't hesitate to contact us. Or if you know some tips or other ways we didn't mention here, please let us know! We will update this article.