Вы могли бы дать ссылку и открыть его в IFRAME (но это, кажется, запрещено DocuWare):
echo '<a href="http://myServer/DocuWare/Platform/WebClient/Client/Document?fc=630a90e4-d6a8-4c9d-b8e0-045008e380ba&did=850351"
target="docuware">Link to Document</a>';
echo '<iframe id="docuware" name="docuware" style="height:400px; width:400px;"></iframe>';
так что вы можете открыть его в новом окне/вкладке:
echo '<a href="http://myServer/DocuWare/Platform/WebClient/Client/Document?fc=630a90e4-d6a8-4c9d-b8e0-045008e380ba&did=850351"
target="_blank">Link to Document</a>';
Или вы можете загрузить документ отверстие, чтобы сохранить его в временную папку на сервере. Тогда вы должны управлять аутентификациями (см here):
private function _downloadDocuware($dwdocid, $destination, $withAnnotations = null) {
$source = DOCUWARE_HOST . "DocuWare/Platform/FileCabinets/630a90e4-d6a8-4c9d-b8e0-045008e380ba/Documents/" . $dwdocid . "/FileDownload?";
// check Annotations
if ($withAnnotations == true){
$source .= "targetFileType=PDF&keepAnnotations=true&downloadFile=true&autoPrint=false&layers=1%2C2%2C3%2C4%2C5";
}
else{
$source .= "keepAnnotations=false&downloadFile=true&autoPrint=false";
}
require_once 'docuware/DwPlatformAuthentication.php';
DwPlatformAuthentication::GetAuthentication();
$dwplatformauth = DwPlatformAuthentication::GetDwPlatformAuth();
$dwplatformbrowserid = DwPlatformAuthentication::GetDwPlatformBrowserId();
$options = array (
"http" => array (
"header" => "Content-Type: */*\r\n" .
"Cookie: DWOrganization=MyCompany; " .
"openInNewWindow=False; " .
"DWPLATFORMBROWSERID=" . $dwplatformbrowserid . "; " .
".DWPLATFORMAUTH=" . $dwplatformauth . "\r\n",
"method" => "GET"
)
);
$context = stream_context_create ($options);
try {
file_put_contents (utf8_decode ($destination), file_get_contents ($source, false, $context));
return true;
}
catch (Exception $e) {
return false;
}
}
Надеется, что это помогает.
Вы связались с DocuWare? –
Используйте свой сервис REST? https://help.docuware.com/sdk/platform/html/027e4061-5f04-4d57-8843-ba6e700887be.htm – EJTH
Как я могу это использовать? Они только приводят примеры в C#. – Jack