Nggunakake PHP API sing kuat, pangembang bisa ngompres TIFF kanggo ngoptimalake isi lan ukuran file output. Ngurangi ukuran file dumadi kanthi ngresiki data lan sumber daya sing ora digunakake. Sampeyan uga bisa compress gambar kanggo nggawe ukuran file output malah luwih cilik.
Asil optimasi lan kompresi isi bisa disimpen ing TIFF asli utawa format nyimpen sing kasedhiya - DOCX, DOC, RTF, PDF, HTML lan liya-liyane.
Kaya sing wis kasebut, SDK PHP kita ngidini sampeyan nyuda ukuran TIFF kanthi program. Lan saiki sampeyan bisa nyoba fungsi sing kuat lan ngevaluasi cara ngompres TIFF ing PHP kanthi conto ing ngisor iki:
use Aspose\Words\WordsApi;
$wordsApi = new WordsApi('####-####-####-####-####', '##################');
$requestDocument = "Input.tiff";
$requestCompressOptions = new CompressOptions(array(
"images_quality" => 75,
"images_reduce_size_factor" => 1,
));
$compressDocumentRequest = new CompressDocumentOnlineRequest(
$requestDocument, $requestCompressOptions, NULL, NULL, NULL, NULL
);
$compressDocument = $wordsApi->compressDocumentOnline($compressDocumentRequest);
$convertDocument = new ConvertDocumentRequest(
$compressDocument->document()->values(), "tiff", NULL, NULL, NULL, NULL
);
$wordsApi->convertDocument($convertDocument);
Instal 'Aspose.Words Cloud SDK for PHP' saka gudang Packagist. Mung mbukak composer require aspose-cloud/aspose-words-cloud kanggo nginstal SDK, banjur gunakake require_once('vendor/autoload.php'); kanggo ngimpor menyang proyek sampeyan.
Minangka alternatif, sampeyan bisa kanthi manual kloning Aspose.Words Cloud SDK for PHP saka GitHub. Tututi Instructions iki supaya cepet entuk kredensial keamanan sing dibutuhake lan ngakses REST API kita.
PHP 7.1 utawa luwih anyar
Deleng Repository Documentation kanggo ndeleng rincian liyane.
Sampeyan bisa nindakake kompresi dokumen kanggo format file liyane: