Barcode prnting with Webservice

vrushankvrushank Member Posts: 16
edited 2011-12-05 in NAV Three Tier
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

Comments

  • deV.chdeV.ch Member Posts: 543
    Have a look at my thread : viewtopic.php?f=32&t=46507&hilit=print+pdf

    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.
  • vrushankvrushank Member Posts: 16
    Thank you Dev.Ch, I'm going to try the solution out, will let you know of the results!

    Thanks once again!
    A day without the sun is like night
  • vrushankvrushank Member Posts: 16
    Hey Dev.Ch,

    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!
    A day without the sun is like night
  • deV.chdeV.ch Member Posts: 543
    Nice to hear it's working for you, you're welcome :D
Sign In or Register to comment.