<?php
require './vendor/autoload.php';

use NcJoes\OfficeConverter\OfficeConverter;

$converter = new OfficeConverter("建議書報價單服務費預算呈核表.doc", "./out", "soffice.bin ", false);
$converter->convertTo('建議書報價單服務費預算呈核表.pdf'); //generates pdf file in same directory as test-file.docx


/*
$im = new imagick();
$im->readimage($_SERVER['DOCUMENT_ROOT'] . '/BIM-Monitor/out/建議書報價單服務費預算呈核表.pdf[0]');
$im->setImageFormat('jpg');
header('Content-Type: image/jpeg');
echo $im;

$im->writeImage($_SERVER['DOCUMENT_ROOT'] . '/BIM-Monitor/out/建議書報價單服務費預算呈核表.jpg');
$im->clear();
$im->destroy();*/
