public function appendDocument($basePdf, $newPdf, $startPage = 0, $endPage = 0, $sourceFolder = '')
    {
        //check whether files are set or not
        if ($basePdf == '')
            throw new Exception('Base file not specified');
        if ($newPdf == '')
            throw new Exception('File to merge is not specified');

        //build URI to merge PDFs
        if ($sourceFolder == '')
            $strURI = Product::$baseProductUri . '/pdf/' . $basePdf .
                '/appendDocument?appendFile=' . $newPdf . ($startPage > 0 ? '&startPage=' . $startPage : '') .
                ($endPage > 0 ? '&endPage=' . $endPage : '');
        else
            $strURI = Product::$baseProductUri . '/pdf/' . $basePdf .
                '/appendDocument?appendFile=' . $sourceFolder . '/' . $newPdf .
                ($startPage > 0 ? '&startPage=' . $startPage : '') .
                ($endPage > 0 ? '&endPage=' . $endPage : '') .
                '&folder=' . $sourceFolder;

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'POST', '', '');

        $json = json_decode($responseStream);

        if ($json->Code == 200) {
            $folder = new Folder();
            $path = "";
            if ($sourceFolder == "") {
                $path = $basePdf;
            } else {
                $path = $sourceFolder . '/' . $basePdf;
            }
            $outputStream = $folder->GetFile($path);
            $outputPath = AsposeApp::$outPutLocation . $basePdf;
            Utils::saveFile($outputStream, $outputPath);
        } else {
            return false;
        }
    }