Here is the code :
// Set cURL parameters
$url = ‘https://api.groupdocs.cloud/v2.0/comparison/comparisons’;
$headers = [
‘accept: application/json’,
‘Content-Type: application/json’,
‘x-aspose-client: Containerize.Swagger’,
'authorization: Bearer ’ . $this->accessToken
];
$data = json_encode([
‘SourceFile’ => [
‘FilePath’ => $pathSource,
// ‘VersionId’ => null,
// ‘StorageName’ => null,
// ‘Password’ => null
],
‘TargetFiles’ => [
[
‘FilePath’ => $pathTarget,
// ‘VersionId’ => null,
// ‘StorageName’ => null,
// ‘Password’ => null
]
],
‘Settings’ => [
‘GenerateSummaryPage’ => true,
‘ShowDeletedContent’ => true,
‘ShowInsertedContent’ => true,
‘StyleChangeDetection’ => true,
// ‘InsertedItemsStyle’ => [
// ‘FontColor’ => ‘string’,
// ‘HighlightColor’ => ‘string’,
// ‘BeginSeparatorString’ => ‘string’,
// ‘EndSeparatorString’ => ‘string’,
// ‘Bold’ => true,
// ‘Italic’ => true,
// ‘StrikeThrough’ => true,
// ‘Underline’ => true
// ],
// ‘DeletedItemsStyle’ => [
// ‘FontColor’ => ‘string’,
// ‘HighlightColor’ => ‘string’,
// ‘BeginSeparatorString’ => ‘string’,
// ‘EndSeparatorString’ => ‘string’,
// ‘Bold’ => true,
// ‘Italic’ => true,
// ‘StrikeThrough’ => true,
// ‘Underline’ => true
// ],
// ‘ChangedItemsStyle’ => [
// ‘FontColor’ => ‘string’,
// ‘HighlightColor’ => ‘string’,
// ‘BeginSeparatorString’ => ‘string’,
// ‘EndSeparatorString’ => ‘string’,
// ‘Bold’ => true,
// ‘Italic’ => true,
// ‘StrikeThrough’ => true,
// ‘Underline’ => true
// ],
// ‘WordsSeparatorChars’ => [
// ‘string’
// ],
// ‘UseFramesForDelInsElements’ => true,
// ‘CalculateComponentCoordinates’ => true,
// ‘MarkChangedContent’ => true,
// ‘MarkNestedContent’ => true,
// ‘MetaData’ => [
// ‘Author’ => ‘string’,
// ‘LastSaveBy’ => ‘string’,
// ‘Company’ => ‘string’
// ],
// ‘Password’ => ‘string’,
// ‘DiagramMasterSetting’ => [
// ‘MasterPath’ => ‘string’,
// ‘UseSourceMaster’ => true
// ],
// ‘OriginalSize’ => [
// ‘Width’ => 0,
// ‘Height’ => 0
// ],
‘HeaderFootersComparison’ => true,
// ‘SensitivityOfComparison’ => 0
],
‘OutputPath’ => $pathComparison
]);
// Set cURL and call
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
$errors = curl_error($curl);
curl_close($curl);
And files :
Billet Maxime.pdf (141.4 KB)
Billet Maxime.pdf (141.4 KB)
(The files are the same)