Hey Guys,
I've been trying to print a barcode using web services. For this, i have exposed a codeunit web service which calls the NAV report that prints the barcode.
Following is the code:
BarcodeRep.SetBCodeTxt('MW031112345678BP-WP-0000128');
BarcodeRep.USEREQUESTFORM(FALSE);
BarcodeRep.RUNMODAL;
This works fine when i'm executing it through Classic or RTC, but the same gives me the following error when i'm running it using the web service.
I know that the error is due to the fact that i cannot do a run or runmodal when in web service mode. I'd like to know of any alternative of carrying out this printing business.
Thanks Guys!
A day without the sun is like night
0
Comments
Just make sure to:
- restart the service tier machine so that it loads the barcode font
- Read last post carefully! You need another component that does the actual printing, this is because you need a Network User where you can map your printers to. This Component then invokes the call to the pdf printer software (in my example foxit reader).
If you need any instruction the component that watches the folder & prints the pdf's let me know.
Thanks once again!
Thank you for the solution. I've been sucessfull in printing the barcode from the pdf to the Barcode printer. However, I think i'd have to set the page properties of the pdf to fit the barcode page.
I'm printing on a 1 inch X 2 inch paper size, so at the moment, my barcode from pdf file doesn't fit the paper size.
Well, thanks once again buddy!