V
vs.parthasarathy
Hi,
I am trying to convert a visio drawing file to pdf programmatically
using Document:rintOut method.
If the parameter "Print to File" is set to false then it is working
fine, but the problem is, it pops up the dialog box to specify the
target file, so I passed false to "Print to File" parameter and gave
the file location in the "OutputFilename" parameter now it is giving
an error "When you create a PostScript file you have to send the host
fonts". I tried using some other pdf printer, but it didn't generate
the pdf properly.
Code snippet:
_bstr_t OutputFileName("c:\\drawing1.pdf");
_bstr_t SourceFileName("C:\\Drawing1.vsd");
_bstr_t bsPrinter("Adobe PDF");
Visio::IVDocumentPtr doc = vApp->Documents->Open(SourceFileName);
vApp->ActiveDocument->PrintOut(Visio::visPrintAll, 1, 1, VARIANT_TRUE,
bsPrinter,
VARIANT_TRUE, OutputFileName, 1, VARIANT_TRUE, VARIANT_FALSE);
I have Visio 2003 & SP3
Please give me some idea on how to resolve this.
Thanks,
VSP
I am trying to convert a visio drawing file to pdf programmatically
using Document:rintOut method.
If the parameter "Print to File" is set to false then it is working
fine, but the problem is, it pops up the dialog box to specify the
target file, so I passed false to "Print to File" parameter and gave
the file location in the "OutputFilename" parameter now it is giving
an error "When you create a PostScript file you have to send the host
fonts". I tried using some other pdf printer, but it didn't generate
the pdf properly.
Code snippet:
_bstr_t OutputFileName("c:\\drawing1.pdf");
_bstr_t SourceFileName("C:\\Drawing1.vsd");
_bstr_t bsPrinter("Adobe PDF");
Visio::IVDocumentPtr doc = vApp->Documents->Open(SourceFileName);
vApp->ActiveDocument->PrintOut(Visio::visPrintAll, 1, 1, VARIANT_TRUE,
bsPrinter,
VARIANT_TRUE, OutputFileName, 1, VARIANT_TRUE, VARIANT_FALSE);
I have Visio 2003 & SP3
Please give me some idea on how to resolve this.
Thanks,
VSP