Convertir un fichier SVG au format PDF en Ruby
Contents
[
Hide
]
Aspose.PDF - Convertir SVG en PDF
Pour convertir un fichier SVG au format PDF à l’aide de Aspose.PDF Java pour Ruby, utilisez le module SvgToPdf.
Code Ruby
# The path to the documents directory.
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
# Instantiate LoadOption object using SVG load option
options = Rjb::import('com.aspose.pdf.SvgLoadOptions').new
# Create document object
pdf = Rjb::import('com.aspose.pdf.Document').new(data_dir + 'Example.svg', options)
# Save the output to XLS format
pdf.save(data_dir + "SVG.pdf")
puts "Document has been converted successfully"
Télécharger l’exemple de code
Téléchargez Convertir SVG en PDF (Aspose.PDF) à partir de l’un des plateformes d’hébergement de code mentionnées ci-dessous :