تحويل PDF إلى تنسيق SVG في Ruby

Aspose.PDF - تحويل PDF إلى SVG

لتحويل PDF إلى تنسيق SVG باستخدام Aspose.PDF Java for Ruby، ما عليك سوى استدعاء وحدة PdfToSvg.

كود Ruby

# The path to the documents directory.

data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'

# Open the target document

pdf = Rjb::import('com.aspose.pdf.Document').new(data_dir + 'input1.pdf')

# instantiate an object of SvgSaveOptions

save_options = Rjb::import('com.aspose.pdf.SvgSaveOptions').new

# do not compress SVG image to Zip archive

save_options.CompressOutputToZipArchive = false

# Save the output to XLS format

pdf.save(data_dir + "Output.svg", save_options)

puts "Document has been converted successfully"

تنزيل الكود قيد التشغيل

تحميل تحويل PDF إلى تنسيق SVG (Aspose.PDF) من أي من مواقع الترميز الاجتماعية المذكورة أدناه: