MSDN > 論壇首頁 > XML Paper Specification (XPS) > Need Urgent Help - Is there a way I can compare 2 XPS documents
發問發問
 

問題Need Urgent Help - Is there a way I can compare 2 XPS documents

  • 2009年6月3日 下午 09:21Chandrakanth Prasanna 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    All,

    I am struggling with Adobe PDF comparison. I contacted Adobe and they mentioned that comparison feature is not available for automation. Thank God I saw this new document format ( XPS ) from Microsoft. Can you please let me know whether the following is possible and also what basics should be installed in the system ?

    1. Generate an XPS document from Adobe PDF.
       ( automation only using VB Script or .NET ; I already created the document from the Print menu in Windows Vista )

    2. Compare the generated XPS for appearance, rendering and content.

    3. Is there anyway to generate the XAML from the XPS document and compare the XAML / XML documents ?

    Thanks for your time and patience.

    Chandrakanth

所有回覆

  • 2009年6月4日 上午 08:18nixps 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi,

    how did you create the PDF? Maybe you can print to the MXDW, and have an XPS right away.
    You can also print the PDF to XPS, but you need an app that can print PDF. Alternatively you'll need a library that converts PDF to XPS.

    For the comparison: you could render the XPS files to raster, and check the rasters for differences.
    This is of course a pure visual comparison.
    (We do this as part of our regression testing here @ NiXPS)

    If you would want a structural diff, you would do so by comparing the components of each XPS individually. 
    Of course, this will only yield satisfying results if the XPS files are not very 'structurally different'.

    Regards,
    Nick.

    Check out my cross platform xps library and tools at http://nixps.com
  • 2009年6月4日 下午 01:51Chandrakanth Prasanna 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    Nick,

    Thanks for the reply. I created the PDF using Cute Editor. I am able to print ( save the file as PDF ) using Micrososft XPS Document Writer. The XPS file is generated as well.

    I want to know whether there is an automation library available in any .NET language to convert XPS to PDF and compare them ? Also can you please explain what do you mean by "raster" ?

    Also if you can let me know whether there is any way I can convert the XPS to XML  or get the XML that makes up each page of XPS programatically ?

    Thanks,
    Chandrakanth