Convert SVG file to PDF format in PHP

Aspose.PDF - Convert SVG to PDF

To convert SVG file to PDF format using Aspose.PDF Java for PHP, simply invoke SvgToPdf module.

PHP Code

# Instantiate LoadOption object using SVG load option
$options = new SvgLoadOptions();

# Create document object
$pdf = new Document($dataDir . 'Example.svg', $options);

# Save the output to XLS format
$pdf->save($dataDir . "SVG.pdf");

print "Document has been converted successfully";

Download Running Code

Download Convert SVG to PDF (Aspose.PDF) from any of the below mentioned social coding sites: