Error while convert to PDF

  • Thread starter vs.parthasarathy
  • Start date
V

vs.parthasarathy

Hi,

I am trying to convert a visio drawing file to pdf programmatically
using Document::printOut 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
 
D

Dadi

Hi there,

I am trying to do similar thing in C# but even with the option "Print to
File" set to False ... I do not get the dialog box ... I am wondering if I am
missing something here. Any Idea? If the option is True to False I have same
problem system is waiting for Dialog box ... but it does not show up!!!

Thanks
 

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