Print SVG Document in VB.Net using visio.Document object

M

Murali

Dear Sir/Madam,

Requirement : Convert/Print SVG file to PDF File.

Please go through the following code to check flow.

Dim objApp As New Visio.InvisibleApp
Dim objDoc As Visio.Document
Try
objDoc = objApp.Documents.Open("c:\Block.svg")
objDoc.Printer = "Adobe PDF"
objDoc.PrintOut(Visio.VisPrintOutRange.visPrintCurrentPage, , ,
, objDoc.Printer, True, "C:\Block.pdf")
objApp.ActiveDocument.Saved = True
objApp.ActiveDocument.Close()
objApp.Quit()
objApp = Nothing
objDoc = Nothing
Catch ex As Exception
objApp.ActiveDocument.Close()
objApp.Quit()
objApp = Nothing
objDoc = Nothing
MsgBox(Err.Description)
End Try

If i do like this , i am getting the Following Error.

When you create a PostScript file you have to send the host fonts.
Please go to the printer properties, "Adobe PDF Settigs" page and turn OFF
the option "Do not send fonts to Distiller".

If i change the properties like the above .... I can cerate the PDF file but
i could not able to open. Its saying that is corrupted fiel.

Please Assist me.
Murali
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top