How to convert tiff to XPS from ASP?

   In this article, we will talk about how to convert image tiff to XPS from ASP programming language. The software I use is named as VeryDOC Image to XPS Converter, by which you can also convert other image files like JPG, JPEG, GIF, PNG, BMP, TGA, WMF to XPS file. When converting tiff to XPS, this software either can convert single page XPS or multipage tiff file to XPS file format.  During the conversion, you can directly print output XPS file to some printer and specify output printing paper size. There are more functions of this software, please check them on our software homepage. In the following part, let us check how to convert tiff to XPS from ASP code template.

Step 1. Download Image to XPS Converter Command Line

  • For now there is no COM version of this software, but if you need, please contact us then we can develop one for you.
  • When downloading finishes, it is a zip file. Please extract it then you can call it from MS Dos Window. Even if this is command line application but it also could be called from other programming languages like Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.

Step 2. Convert tiff to XPS from ASP code

  • Here is the command line usage: Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.
  • When calling this software from ASP code for converting tiff to XPS, please refer to the following code template.
    Please use following ASP code to run the conversion inside a special user account,
    ~~~~~~~~~~~~~~~~~
    <%
        Set comEXEShell = Server.CreateObject("exeshell.shell")
        RootPath = Server.MapPath(".") & "\"
        EXEFile = RootPath & "img2xps\img2xps.exe"
        InFile = RootPath & "test.tif"
        OutFile = RootPath & "out.xps"
        strCommandLine = EXEFile & " " & InFile & " " & OutFile
        response.write strCommandLine & "<br>"
        comEXEShell.RunCommandLine "UserName", "Password", strCommandLine
        Set comEXEShell = Nothing
    %>
    ~~~~~~~~~~~~~~~~~
    When you use this software, please make sure you have the following two elements downloaded:
  • http://www.verydoc.com/exeshell.html
    http://www.verydoc.com/download/exeshell.zip
    Remark:
    You may encounter Error 1314 in some Windows systems when you switch between user accounts, this is caused by permission setting, please refer to the steps in #2 to solve the 1314 Error.

  • Here are some parameters you may use, please have a check:
  • -printer <string> : set printer name to create XPS file
    -paper <string>   : set paper size to XPS format
      auto   : retrieve paper size from image file
      number : standard paper size
      others : user defined paper size

    During the using, if you have any question, please contact us as soon as possible.

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

This entry was posted in Image to XPS Converter and tagged . Bookmark the permalink.

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!