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.

How to convert xps to pdf offline

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.

Instruction:

  1. Open DocuFreezer.
  2. Click "Add files" or "Add folder" to add XPS or OXPS files. A browse window will open, where you can select any supported files or scan a folder for files of a specific file format.
    Convert multiple XPS files to PDF with DocuFreezer
  3. Click the Settings button to change conversion settings. Here you can select page arrangement - multipage or append to existing document. You can also set up the way of converting attachments and set rasterization resolution value in the Advanced pane.
    Multipage and append to PDF conversion settings
  4. Click "OK" and "Start" to start the conversion.

Download Docufreezer


How to automatically convert XPS to PDF

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.

Instruction:

  1. Open FolderMill.
  2. Create a new Hot Folder.
    Create new Hot Folder in FolderMill
  3. Assign a file conversion task by adding "Convert to PDF" Action.
    Convert to PDF in FolderMill
  4. Set necessary action parameters in the appeared menu. You can change output folder, make a PDF/A for long-term preservation of a document instead of a regular PDF, enable appending to existing PDF and overwriting files with the same filename.
    PDF parameters in FolderMill
  5. Click "OK" and "Apply changes"
  6. Click the "Start" button on the main menu to run FolderMill file processing.
    Start FolderMill file processing

Download FolderMill


How to print XPS to PDF

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.

Instruction:

  1. Download and install Universal Document Converter.
  2. Open an XPS file you want to convert to PDF.
  3. Click "File" > "Print".
  4. Select Universal Document Converter as printer and click "Preferences".
    Select Universal Document Converter as a virtual printer
  5. Click "File Format" and select "PDF document". Here you can select multipage options - singlepage, multipage or append, set type of PDF - Regular PDF, PDF/A or password-protected PDF, and select between searchable or bitmapped structure of the output PDF file(s).
    Transfer XPS to PDF with Universal Document Converter
  6. You can also set many other parameters, such as paper size, page orientation, resolution, crop and resize options, set output folder and post-processing actions or apply watermark, if you look into "Page setup", "Adjustments" "Watermark", "Output Location" and "Post-processing" menus.
    Print XPS to PDF with a virtual printer
  7. Click "OK" and "Print".

Download Universal Document Converter


How to batch convert XPS to PDF

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.

Instruction:

  1. Place your XPS files to any folder, for instance C:\In\.
  2. Open Windows Command Prompt (Win+R on your keyboard, type "cmd" and press Enter or start typing Command Prompt in Windows start menu).
  3. Type in a command line 2PDF.exe -src "C:\In\*.xps" -dst "C:\Out". All XPS files from C:\In\ input folder will be converted and placed to C:\Out output folder:
    File conversion to PDF via 2PDF software
  4. Press Enter to execute the command.

Download 2PDF


How to convert XPS to PDF with a script

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:

Options, operations, formats and switches available in 2PDF

Instruction:

  1. Create a folder, where you will input files to be converted, e.g. С:\Files to convert\.
  2. Open Notepad to create a new script or batch file.
  3. Type in a sequence of commands in line with 2PDF command line syntax (see screenshot above).
  4. Save your text file with .BAT or .CMD extension.
  5. Start Windows Task Scheduler. (Win+R on your keyboard, type "Taskschd.msc" and press Enter).
  6. In the Actions Pane, click "New Folder…" and set a name for it, for example, "Convert XPS to PDF". Then click Create task… and also name it as you like.
  7. Specify file path to your CMD or BAT file in Create Task menu>Actions.
    Batch file to set automated conversion of XPS files to JPG with 2JPEG
  8. In the Triggers, Conditions and Settings panes you can create various time-based triggers or event-based triggers to start the conversion.
    Trigger conversion from XPS (.*xps, .*oxps) to JPG in Windows Task Scheduler
  9. Once the trigger works, conversion will start automatically.

Download 2PDF


How to convert XPS to PDF from your own software

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();
} 

Download 2PDF


How to convert files online (is it safe?)

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:

  • Study the website legal and privacy policy of the service you're about to use
  • Check that you can trace the website back to a person or company
  • Make sure that the files you're uploading do not have any sensitive content

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.


What is XPS

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.


What is PDF

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:

  • Image-based, bitmapped or scanned PDF files; usually scanned or photographed images of pages, without an underlying text layer.
  • Searchable PDF files; usually created using OCR (Optical Character Recognition) technology which was applied to scanned PDFs or other image documents or exported from software as searchable. Such PDF files are almost indistinguishable from the "original" PDFs.

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.

Questions?

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.