I want to print the SVG Document in VB.Net by using the Visio. Document Component.
=
Please check the Process :
=
Step 1 : Create SVG File in C drive. (C:\Block.svg). =
Note : Please copy the following xml tags in new text document and save as SVG file. =E2=
=80=9CBlock.svg=E2=80=9D
=
<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "
http://www.w3.org/TR/2001/REC=
-SVG-20010904/DTD/svg10.dtd">
<!-- Generated by Microsoft Visio 11.0, SVG Export, v1.0 B5.svg Page-1 -->
<svg xmlns=3D"
http://www.w3.org/2000/svg" xmlns:v=3D"
http://schemas.micro=
soft.com/visio/2003/SVGExtensions/" width=3D"8.5in"
height=3D"11in" viewBox=3D"0 0 612 792" xml:space=3D"preserve" color-interpol=
ation-filters=3D"sRGB" class=3D"st1">
<v:documentProperties v:langID=3D"1033" v:viewMarkup=3D"false"/>
=
<style type=3D"text/css">
<![CDATA[
.st1 {fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-l=
inecap:square;stroke-miterlimit:3}
.st2 {fill:#e8eef7;stroke:#000000;stroke-linecap:round;stroke-linejoin:r=
ound;stroke-width:0.24}
]]>
</style>
=
<defs id=3D"Masters">
<symbol id=3D"master0" v:mID=3D"0" class=3D"st1">
<title>Square</title>
<g id=3D"master-shape5-2" v:mID=3D"5" v:groupContext=3D"shape">
<title>Sheet.5</title>
<v:userDefs>
<v:ud v:nameU=3D"visVersion" v:val=3D"VT0(11):26"/>
</v:userDefs>
<rect x=3D"0" y=3D"684" width=3D"108" height=3D"108" class=3D"st2"/>
</g>
</symbol>
</defs>
<g v:mID=3D"0" v:index=3D"1" v:groupContext=3D"foregroundPage">
<v:userDefs>
<v:ud v:nameU=3D"SchemeName" v:val=3D"VT4(Default)"/>
</v:userDefs>
<title>Page-1</title>
<v
ageProperties v:drawingScale=3D"1" v
ageScale=3D"1" v:drawingUnits=3D=
"0" v:shadowOffsetX=3D"9" v:shadowOffsetY=3D"-9"/>
<v:layer v:name=3D"Connector" v:index=3D"0"/>
<use id=3D"shape1-1" v:mID=3D"1" xlink:href=3D"#master0" transform=3D"trans=
late(72,-648)">
<title>Square</title>
</use>
</g>
</svg>
=
Step 2: Create new VB.Net Project and copy following code in form.
=
Dim objApp As New Visio.InvisibleApp
Dim objDoc As Visio.Document
objDoc =3D objApp.Documents.Open(=E2=80=9CC:\Block.svg=E2=80=9D)
=
=E2=80=98If I can print by using =E2=80=9CHP LaserJet 5000 Series PCL=E2=80=9D. I a=
m unable to print by using Microsoft Office Document Image Writer or PDF Type one.
objDoc.Printer =3D =E2=80=9CMicrosoft Office Document Image Writer=E2=80=9D =E2=
=80=98 or PDF
=
objDoc.PrintFitOnPages =3D True
objDoc.PrintOut(Visio.VisPrintOutRange.visPrintCurrentPage, , , , , True, =E2=
=80=9CBlock=E2=80=9D)
objApp.ActiveDocument.Saved =3D True
objApp.ActiveDocument.Close()
objApp.Quit()
objApp =3D Nothing
objDoc =3D Nothing
=
If I do like this I could able to save/print the file, but it is saving in System32 Folde=
r (E.g.: C:\WINDOWS\system32\Block.mdi). I want to save this file in specified fol=
der; I want to know how to specify the folder.
=
Please assist me, How to solve this problem. =
=
If we couldn=E2=80=99t do by using the above process, please let me know the process.=