---
title: "Integrating DocuVieware in your PHP client application"
canonical_url: "https://www.nutrient.io/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-php-client-application/"
md_url: "https://www.nutrient.io/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-php-client-application.md"
last_updated: "2026-05-18T15:55:45.958Z"
description: "Integrate the DocuVieware control into your PHP client application with setup and implementation steps."
---

# Integrating DocuVieware in your PHP client application

> This guide focuses on integrating the DocuVieware control into a client application. Follow the [serving DocuVieware through a REST API](https://www.nutrient.io/guides/docuvieware/other-technologies/serving-docuvieware-through-a-rest-api.md) guide.

> Find the source code for both the REST service and integration examples in your `[INSTALL FOLDER]\Samples\ASP.NET\DocuVieware` folder.

## Prerequisite

DocuVieware only requires its own JavaScript and CSS files from your `[SDK INSTALL DIR]\Redist\DocuVieware (Resources)` folder. In the following examples, it’s assumed that they’re available locally.

```html

<script src="docuvieware-min.js"></script>
<link rel="stylesheet" type="text/css" href="docuvieware-min.css">

```

The last thing required is the complete and accurate URL your REST service is reachable at.

For this guide, it’s assumed that the service is locally running on the machine using port `62968`. The complete URL to the method is:

```text

http://localhost:62968/api/DocuViewareREST/GetDocuViewareControl

```

Your own implementation will mostly differ — especially the port that’s usually randomly selected upon project creation by Visual Studio. Adapt the URL to your configuration.

## Integration using PHP

Below is how to access the REST service using the PHP cURL library:

```php

session_start();
 header('Content-Type: text/html; charset=utf-8');
$docuViewareConfig = array(
 'SessionId' => session_id(),
 'ControlId' => 'DocuVieware1',
 'AllowPrint' => true,
 'EnablePrintButton' => true,
 'AllowUpload' => true,
 'EnableFileUploadButton' => true,
 'CollapsedSnapIn' => true,
 'ShowAnnotationsSnapIn' => true,
 'EnableRotateButtons' => true,
 'EnableZoomButtons' => true,
 'EnablePageViewButtons' => true,
 'EnableMultipleThumbnailSelection' => true,
 'EnableMouseModeButtons' => true,
 'EnableFormFieldsEdition' => true,
 'EnableTwainAcquisitionButton' => true
 );
 $data_string = json_encode($docuViewareConfig);
$ch = curl_init('http://localhost:62968/api/DocuViewareREST/GetDocuViewareControl');
 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
 curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($ch, CURLOPT_HTTPHEADER, array(
 'Content-Type: application/json',
 'Content-Length: '. strlen($data_string))
 );
 $result = curl_exec($ch);
 if ($result === false) {
 $info = curl_getinfo($ch);
 curl_close($ch);
 die('Error occured during curl exec.: '. var_export($info));
 }
curl_close($ch);
 $docuViewareControlHtml = $result;

```

To integrate the resulting HTML markup in your client page, use the following code:

```php

$html = json_decode($docuViewareControlHtml);
print $html->{'HtmlContent'};

```

## Related guides

- [Serving DocuVieware through a REST API](https://www.nutrient.io/guides/docuvieware/other-technologies/serving-docuvieware-through-a-rest-api.md)

- [Client/server coming and going with custom actions](https://www.nutrient.io/guides/docuvieware/other-technologies/rest-client-server-coming-and-going-with-custom-actions.md)

- [Use and handling of the selection area](https://www.nutrient.io/guides/docuvieware/other-technologies/rest-use-and-handling-of-the-selection-area.md)

- [Custom snap-in implementation](https://www.nutrient.io/guides/docuvieware/other-technologies/rest-custom-snap-in-implementation.md)
---

## Related pages

- [Integrating DocuVieware in your AngularJS client application](/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-angularjs-client-application.md)
- [How to set up and use DocuVieware with React](/guides/docuvieware/other-technologies/how-to-set-up-and-use-docuvieware-with-react.md)
- [DocuVieware guide for Blazor](/guides/docuvieware/other-technologies/docuvieware-tutorial-for-blazor.md)
- [Introduction](/guides/docuvieware/other-technologies.md)
- [Integrating DocuVieware in your Angular2 client application](/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-angular2-client-application.md)
- [Integrating DocuVieware in your JavaScript/jQuery client application](/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-javascript-jquery-client-application.md)
- [Integrating DocuVieware in your Java client application](/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-java-client-application.md)
- [Integrating DocuVieware into SharePoint 2019](/guides/docuvieware/other-technologies/integrating-docuvieware-into-sharepoint-2019.md)
- [Integrating DocuVieware in your Node.js client application](/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-nodejs-client-application.md)
- [Integrating DocuVieware in your ASP.NET Core MVC Razor client application](/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-asp-dotnet-core-mvc-razor-client-application.md)
- [Use and handling of the selection area](/guides/docuvieware/other-technologies/rest-use-and-handling-of-the-selection-area.md)
- [Custom snap-in implementation](/guides/docuvieware/other-technologies/rest-custom-snap-in-implementation.md)
- [Client/server coming and going with custom actions](/guides/docuvieware/other-technologies/rest-client-server-coming-and-going-with-custom-actions.md)
- [Integrating DocuVieware in your ASP.NET MVC Razor client application](/guides/docuvieware/other-technologies/integrating-docuvieware-in-your-asp-dotnet-mvc-razor-client-application.md)
- [Your first Angular 10 application with DocuVieware](/guides/docuvieware/other-technologies/your-first-angular-10-application-with-docuvieware.md)
- [Serving DocuVieware through a REST API](/guides/docuvieware/other-technologies/serving-docuvieware-through-a-rest-api.md)
- [Integrating DocuVieware with Electron](/guides/docuvieware/other-technologies/integrating-docuvieware-with-electron.md)

