Print To Pdf Follow

0
Avatar
Legacy Poster

Hello,


I am trying to print label as pdf doc. I have treid this with PDF but had no luck.

 

here is the snippet of my code.

 

+++

LabelFormat format = new LabelFormat(template_home + template_name);
format.SubStrings.SetSubString(name, value);
format.PrintSetup.PrinterName = printer_name;


Messages messages = null;
LabelFormatDocument LabelFormat = engine.Documents.Open(format, out messages);

LabelFormat.PrintSetup.JobName = template_name;

LabelFormat.Print("printjob", 5000);


engine.Documents.CloseAll(SaveOptions.SaveChanges);

+++

 

BarTender History Explorer says that it successfuly sent the job to the printer that I specified in the above.

but I don't see anything under output folder.

I have no problem with priting the same label manually but API doesn't seem to work for me.

 

can anyone give an advice on debugging or coding?

--

Minsung

 

3 comments

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

I suppose that you're using a PDF printer driver, if so which one?

 

Is your implementation running in an application or service context?

0
Avatar
Legacy Poster
Comment actions Permalink

I am using PDFCreator and the code is compiled as an assembly and running inside of another application.

0
Avatar
Legacy Poster
Comment actions Permalink

PDFCreator and Application are running under two different IDs. that seemed to be the cause. it is working now.

Please sign in to leave a comment.