MSDN > Home page del forum > XML Paper Specification (XPS) > Need Urgent Help - Is there a way I can compare 2 XPS documents
Formula una domandaFormula una domanda
 

DomandaNeed Urgent Help - Is there a way I can compare 2 XPS documents

  • mercoledì 3 giugno 2009 21.21Chandrakanth Prasanna Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    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

Tutte le risposte

  • giovedì 4 giugno 2009 8.18nixps Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    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
  • giovedì 4 giugno 2009 13.51Chandrakanth Prasanna Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    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