Convert xps to png and set resolution in X, Y direction

    VeryDOC XPS to PNG Command Line Converter can be used to convert xps file to png in batch from script. Meanwhile it allows you to set resolution for output PNG file in X and Y direction. This software also can be used to convert xps to PDF, EPS, PS, BMP, TIFF, JPEG, PNG, PCX, etc. formats. Through adjusting the resolution, you can control output png size and quality. In this article, I will show you how to convert xps to png by command line.

Step 1. Download XPS to PNG Converter

  • Please download this Windows application to your computer. Once downloading finishes, there will be one zip file. Please extract it to some folder then you can check the elements in it.
  • If you need to do the conversion together with C/C++, Delphi, ASP, PHP, C#, .NET, etc., please download the SDK version.

Step 2. Convert xps to png by command line

  • Please do the conversion according to the usage and be in compliance with the examples.
  • Usage:xps2pdf [options] <xps-file> [<out-file>]
    Examples:
    When converting single xps to png file, please refer to the following command line template.
    xps2pdf.exe C:\in.xps C:\out.png
    When you need to convert xps to png in batch, please refer to the following command line templates.
    xps2pdf.exe C:\in\*.xps C:\out\*.png
  • for /r D:\test %F in (*.xps) do "xps2pdf.exe" "%F" "%~dpnF.png"
    for %F IN (D:\test\*.xps) DO "xps2pdf.exe" "%F" "%~dpnF.png"

  • When you need to convert xps to png and set resolution in X and Y directions, please refer to the following template.
  • xps2pdf.exe -xres 600 -yres 600 C:\in.xps C:\out.png
    xps2pdf.exe -xres 600 -yres 600 C:\in.xps C:\out-%04d.png
    xps2pdf.exe -width 1024 -height 768 C:\in.xps C:\out-%04d.png

    -width <int>          : this parameter is an order to set page width to output png file.
    -height <int>         : this parameter is an order to set page height to png file.
    -multipagetif         : when you need to create multipage TIFF format, it will be useful.
    -xres <int>           : this parameter can help you set X resolution to image file
    -yres <int>           : this parameter can help you set Y resolution to image file

    Now let us check the conversion effect from the following snapshot. During the using, if you have any question, please contact our support team.

    input xps and output png

    Note:this feature is only available in the latest version of XPS to PNG Converter which was updated in Apr  9 2013. If you are old customers and would like to update, please contact us then we will update for you.


     

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!