Last updated: August 20, 2018

If you happen to stick with old-fashioned XPS format and convert XPS documents to JPG images from time to time, you might not know that there are more ways than one to do it.

It is actually possible to convert XPS to JPG in a variety of ways: via offline desktop software - manually, automatically or in batch mode, command line interface (CLI), online converters, a virtual printer or a script file, or even by adding a piece of source code to run conversion from your own software.

Think twice before sending an XPS file to your colleague or business partner. It's better to convert an XPS (OXPS) file to popular JPG or PDF first, since they are much more commonly used. In this article we will guide you through various ways to convert XPS to JPEG.

How to convert XPS to JPEG offline

Easily convert many XPS files to JPG with DocuFreezer

A very easy way to export XPS or OXPS documents to JPG is to use a desktop program called DocuFreezer. You can just add the documents to the program's list, make basic settings and click "Start'. DocuFreezer is an easy-to-use file converter, and simplicity is its key feature. It converts multiple XPS files to other popular formats as well: PDF, TIFF, PNG.

Step-by-step instruction:

  1. Open DocuFreezer.
  2. Click "Add files" or "Add folder" to add XPS files. A browse window will open, where you can select any supported files or scan a folder for files of a specific file format.
  3. Click the Settings button to make conversion settings. Here you can select JPEG quality, true color or grayscale color mode. You can also set up the way of converting attachments and rasterization resolution value in the Advanced pane.
    Settings for output JPEG
  4. Click "OK" and "Start" to start the conversion.

Download Docufreezer


How to automatically convert XPS to JPG

Instantly convert XPS (OXPS) to JPG via Hot Folders in FolderMill

If you have intense document flows and need to instantly convert files real-time, try using FolderMill. It is a program for Windows which creates and utilizes special Hot Folders to monitor incoming files. With FolderMill, converting multiple XPS files as well as many other filetypes to JPG may be set up automatically. One can specify a folder for incoming files and a folder for output files, and assign file conversion or printing tasks to a Hot Folder. Once your XPS (OXPS) files are placed into the Hot Folder's incoming subfolder, the program automatically processes them. The output JPEG files will appear in the output folder within a short while.

Step-by-step instruction:

  1. Open FolderMill.
  2. Create a new Hot Folder.
  3. Click "Create new actions set" and select "Convert document to image" action.
    Convert document to image in FolderMill
  4. Set action parameters in the appeared menu. You can set JPEG quality, True color or Grayscale color mode, Rasterization resolution value, options to resize output image and overwrite existing files.
    JPEG image parameters in FolderMill
  5. Click "OK" and "Apply changes"
  6. Click the "Start" button to run FolderMill file processing.
    Run FolderMill file processing

Download FolderMill


How to print XPS to JPG

Convert to JPG with virtual printer Universal Document Converter

XPS files can be saved as JPG images via virtual printer software, such as Universal Document Converter. This software is recognized as a printer in your Windows system - you will see it in Control Panel>Hardware and Sound>Devices and Printers after installation. You just need to select JPEG as the output format, then "print" your file like if you would using a regular printer. Your XPS file will be converted to JPEG. This method works well for converting individual files, but you can also combine Universal Document Converter with Print Conductor to seamlessly convert many files at once without any problem.

Step-by-step instruction:

  1. Download & install Universal Document Converter.
  2. Open an XPS / OXPS file you need to convert to JPG.
  3. Click "File" > "Print".
    Print to JPG with virtual printer Universal Document Converter
  4. Select Universal Document Converter as printer and click "Preferences".
  5. Click "File Format" and select "JPEG image". Here you can select color depth, JPEG quality and "Progressive" rendering algorithm, which optimizes JPEG images for web.
    Convert XPS to progressive JPG with Universal Document Converter
  6. Browse through "Page setup" to set paper size, file orientation and resolution options, "Adjustments" to set crop and resize options, "Watermark" to add a text or image watermark, "Post-Processing" to determine what action should be taken after the conversion is complete and "Output location" to set an output folder.
    JPG parameters in Universal Document Converter
  7. Click "OK" and "Print".

Download Universal Document Converter


How to batch convert XPS to JPG

Converting XPS to JPG via Command Line (CLI)

Here's a solution without graphical user interface - for more advanced users. If you're familiar with a classic Windows tool - Command Prompt - 2JPEG may come in handy. It can perform batch conversion to JPEG from input to output folder. The program utilizes command line interface and converts files via a set of commands.

Step-by-step instruction:

  1. Place your XPS (OXPS) files to any folder, e.g. C:\In\.
  2. Open Windows Command Prompt (Win+R on your keyboard, type "cmd" and press Enter).
    Open Command Prompt
  3. Type in a command line:
    2jpeg.exe -src "C:\In\*.xps" -dst "C:\Out"
    Basic command to batch convert XPS files to JPG with 2JPEG

    where C:\In\ is the input folder, and C:\Out is the output folder. Set additional conversion parameters to JPEG by modifying this command line with examples.

  4. Press Enter to execute the command.

Download 2JPEG


How to convert XPS to JPG with a script

2JPEG can also be launched from a script file. The program can be called, for instance, from CMD or BAT script files. It gives many possibilities for system administrators to deploy 2JPEG in the company's IT structure. For example, file conversion may be set up as a scheduled or repeated task on a server or workstation within an organization.

Step-by-step 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 CMD or BAT file*.
  3. Type in a sequence of commands referring to 2JPEG command line syntax. Here's an example:
    Batch file to set automated conversion of XPS files to JPG with different parameters
2jpeg.exe -src "C:\In\*.xps" -dst "C:\Out" -jpeg mode:progressive -options overwrite:skip -oper Resize size: "800 600" -options pages: "1,3,5-16,25" quality:75
  1. Save your text file with .bat or .cmd file extension.
  2. Start Windows Task Scheduler. (Win+R on your keyboard, type "Taskschd.msc" and press Enter).
  3. In the Actions Pane, click "New Folder…" and set a name for it, for example, "Convert XPS". Then click Create task… and also name it as you wish.
  4. 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
  5. Use Triggers, Conditions and Settings panes to create time-based triggers or event-based triggers, which will kick off the conversion process.
    Trigger conversion from XPS (.*xps, .*oxps) to JPG in Windows Task Scheduler
  6. Once the trigger works, conversion will start automatically.

Download 2JPEG


How to convert XPS to JPG from your own software

You can add conversion functionality to applications by integrating 2JPEG into your software source code. 2JPEG can be run from the program code written in any basic programming language: C++. C #, VB.NET, Pascal, VB Script, JavaScript. Here's an example for C# programming language:

public void convert()
{
    const string sSrcFolder = @"C:\in";
    const string sMask = @"*.xps";
    const string sOutFolder = @"C:\Out";
    string converterPath = @"C:\Program Files (x86)\2JPEG\2jpeg.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 2JPEG


How to convert files XPS to JPG online

If you need to convert such files occasionally, you can use free online converters, which can be easily found in the internet - just google "convert xps to jpg online". However, if you convert several files on a regular basis, it's a good idea to download & install standalone software for batch conversion of XPS (.*xps, .*oxps) files to JPEG (.*jpeg, .*jpg, .*jfif), which does not require Internet connection. Also, if your XPS files contain any sensitive data (payment information, contract details, etc.), we do not recommend using online converters.

Sure, online converters claim they provide high levels of privacy, safety and reliability. “Don’t worry, we’ll delete your files once the conversion is finished.” Believe it or not, but bear in mind that your uploaded files can be seen by others. If you take the risk though, try to make sure that the website does not store, retain or backup files on its server.

If an online service asks you to provide your personal information like email, name or address, it might help them turn you into a future customer for a product that requires you to pay. Unwanted emails can be a total pain! Moreover, such services might work in violation of EU law and recently implemented General Data Protection Regulation (GDPR) - in case they don't receive your consent to collect, process, or store your personal data and do not delete it after uploaded files are processed.

All in all, we do not endorse any particular online converter and are not giving any links or detailed descriptions.


What is XPS

XPS (also referred to as OpenXPS, OXPS) stands for XML Paper Specification. It is a format developed by Microsoft back in 2006. 3 years later, Ecma International adopted it as international standard ECMA-388. Over the time XPS could not gain much popularity compared to the PDF format, however the latest versions of Windows contain better support for XPS files rather than PDF.

This format is used to view, save, share, digitally sign, and protect your document’s content. It is similar to PDF with its ability to keep the document in its original appearance. You can open and view XPS documents by using the XPS Viewer, which is included in your version of Windows.

XPS files may be used to keep various documents with texts, images, fonts and other elements. However, given that this format is less popular than PDF or JPG, it's better to convert a file to JPG or convert your XPS to PDF before sending it to your colleague or business partner.


What is JPEG

JPEG (.jpg or .jpeg. file extension) stands for Joint Photographic Experts Group, named after a committee of developers who created it. It has become the existing standard image now a day due to its compression capability. It is still a popular image format over the web, commonly used for photographs and other image types.

JPEG has an adjustable compression method, which gives a reasonable balance between file size and image quality. All software described in this guide lets you set image quality of output JPEG files. We recommend selecting its value between 75 to 100 and see which works for you better.

Questions?

We tried to cover the topic of XPS to JPEG conversion as comprehensively as possible. If you still have any questions left - please let us know and we'll update this article.