This allows the comparison of any two items of the same type, or two versions of the same item, and displays the differences in a PDF document.



Code Sample


# Get the source and destination items.

$source = $xia.GET_Item(1234, 0);

$destination = $xia.GET_Item(1234, 0);


# Perform the comparison.

Write-Host "Performing comparison";

$data = $xia.Get_ItemComparisonPdf($source, $destination);


# Write the PDF to a file

Write-Host "Saving PDF file";

$filename = "$env:temp\sample.pdf";

[IO.File]::WriteAllBytes($filename, $data);

[System.Diagnostics.Process]::Start($filename);