Пример #1
0
 $content = $pdf->Output(NULL, 'S');
 $file = new CFile();
 $file->path = "uploader/{$date}/";
 $file->name = sprintf(iconv('WINDOWS-1251', 'UTF-8', ACT_FILENAME), ACT_NUM) . '.pdf';
 //basename($file->secure_tmpname($file->path, '.pdf'));
 $file->size = strlen($content);
 $file->putContent($file->path . $file->name, $content);
 $results[$file->name] = $file->path . $file->name;
 $content = $pdf->getOdtContent();
 $file->name = sprintf(iconv('WINDOWS-1251', 'UTF-8', ACT_FILENAME), ACT_NUM) . '.odt';
 $file->size = strlen($content);
 $file->putContent($file->path . $file->name, $content);
 $pdf->remove();
 unset($pdf);
 //--------------------------------------------------------------------------
 $pdf = new ActOdt2Pdf('affix_template.odt');
 $pdf->setStopRemove(true);
 $pdf->setFolder(TEMPLATES_PATH);
 $pdf->convert($act_affix);
 $content = $pdf->Output(NULL, 'S');
 $file = new CFile();
 $file->path = "uploader/{$date}/";
 $file->name = sprintf(iconv('WINDOWS-1251', 'UTF-8', AFFIX_FILENAME), AFX_NUM) . '.pdf';
 //basename($file->secure_tmpname($file->path, '.pdf'));
 $file->size = strlen($content);
 $file->putContent($file->path . $file->name, $content);
 $results[$file->name] = $file->path . $file->name;
 $content = $pdf->getOdtContent();
 $file->name = sprintf(iconv('WINDOWS-1251', 'UTF-8', AFFIX_FILENAME), AFX_NUM) . '.odt';
 $file->size = strlen($content);
 $file->putContent($file->path . $file->name, $content);