Kapalı

asp.net print page task

I have a small task on asp.net, I want to print a text data to receipt printer from web page, I used the following code and it works fine on my local machine:

Service service = null;

protected void Page_Load(object sender, EventArgs e)

{

try

{

ServiceFunc serv = new ServiceFunc();

service = [url removed, login to view]([url removed, login to view](Session["servid"]));

printpage();

}

catch (Exception ex)

{ }

}

public void printpage()

{

PrintDialog pd = new PrintDialog();

PrintDocument pdoc = null;

pdoc = new PrintDocument();

[url removed, login to view]("1");

PrinterSettings ps = new PrinterSettings();

Font font = new Font("Courier New", 12);

PaperSize psize = new PaperSize("Custom", 300, 400);

[url removed, login to view] = pdoc;

[url removed, login to view] = psize;

[url removed, login to view] = 600;

[url removed, login to view] = 300;

[url removed, login to view]("2");

[url removed, login to view] += new PrintPageEventHandler(pdoc_PrintPage);

[url removed, login to view]("3");

PrintPreviewDialog pp = new PrintPreviewDialog();

[url removed, login to view] = pdoc;

[url removed, login to view]("4");

[url removed, login to view]();

[url removed, login to view]("5");

}

void pdoc_PrintPage(object sender, PrintPageEventArgs e)

{

Graphics graphics = [url removed, login to view];

Font font = new Font("Courier New", 10);

[url removed, login to view]("XXX", new Font("Courier New", 9), new SolidBrush([url removed, login to view]), startX, startY + Offset);

}

but on Server it gives me : Forbidden: You don't have permission to access cache on this server. ... 403 .

if you have a solution or another way to print, I will award the task to you.

Beceriler: .NET, ASP, C# Programlama, Baskı

Daha fazlasını gör: printpage asp net, the courier service, service ps 3, service courier, programming font, print me, local courier service, local courier, c sharp object, courier-local, courier local, cache programming, asp net programming, Data e try, asp net web programming, web page programming, small task, receipt print, offset printer, catch local, net document convert, asp web print, net web print receipt printer, access local machine web, session task

İşveren Hakkında:
( 1 değerlendirme ) Abu Dhabi, Egypt

Proje NO: #5361147

Bu iş için 19 freelancer ortalamada $15 teklif veriyor

starcoadmin

Hello, I have reviewed your project posting and are very much excited to assist you in your project. I would appreciate if we can connect over private message or other medium to discuss about the project and provid Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(2 Değerlendirme)
4.5
SEM1991

Hello, I'm very intersted in the task and I'm sure that I can help you. I'm new here but here's my o. [login to view URL] profile to see my feedbacks. [login to view URL] es [login to view URL]~014ea64ce2b310f7dc Best Regards

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(4 Değerlendirme)
2.7
shekky

There can be multiple reasons you could get that error. If you have full administrative access to the server, it should be an easy and quick fix. I'm sure I can fix this for you quickly. Thanks

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(3 Değerlendirme)
2.5
umbrellasofts

why dont you use RDLC Report for this work ? You must use RDLC bultin reports in your project ... further u can discus with me

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(4 Değerlendirme)
1.5
ITConsultant36

Did you try [login to view URL] Please have a look at my profile(portfolio items). Thank you for considering. [login to view URL] [login to view URL] Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(2 Değerlendirme)
1.3
aman90

Just run the above code on the server it would start working, since you are accessing the server from local machine this type of error comes. PM me if it didn't work.

in %bids___i_period_sub_35% gün içinde10%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(1 Yorum)
0.6
moneyfrmhome

A proposal has not yet been provided

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
bharagv

We will complete in as soon as possible because i have created banking application where there is lot of print out from [login to view URL] of the thing we will communication with when we meet or in [login to view URL] me reply for yo Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
WorldDev

Dear, i can use print as you use but it will be better if you use crystal report but any way i can help please contact me and it will be done with in 3 hour thanks amr wafa

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
RavindraVairagi

A proposal has not yet been provided

in %bids___i_period_sub_35% gün içinde15%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)
0.0
shreedhoon

Company Name: SHREEDHOON INFOTECH Description of Company: Shreedhoon infotech is a IT development company with extremely talented employees. Our office is located in Gandhinagar, Gujarat, West India. We take a bott Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
WhiteCodeIT

Dear Sir/Madam, We would like to introduce ourselves as pune based company having extensive experience of more than 3 years in the field of Web based application development and hosting. We have expertise in .Net, P Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
priteshpatel83

Hello friend i think its better to print page using java script function you can send id of table,div to that function and print it.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
imranfarooq3

Dear Reader, I can provide you small and easy solutions within 4 hours. As on server side you need to know your Printer Name. Regards, Imran

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
vikalpchandel

A proposal has not yet been provided

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
mwaqasiqbal

Hi, What I understand is that you are trying to copy the code from a desktop application to a code behind of a web page. What happens in the desktop application is that you are running the application as owner so yo Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
rightdev

Hello, Could you please send me the exact screen shot or document of issued error? I need it for further investigation. Another question, why don't you use javascript method for printing? You can develop a page Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
ermanjeet27

hello sir.... i'm manjeet kaur... i can make it in 1 hour.... if you give me complete description of this thanks sir

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
infiniumglobal

A proposal has not yet been provided

in %bids___i_period_sub_35% gün içinde20%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)
0.0
debrajpramanik

You have to use javascript print function. 1. whatever you want to print that is written into your page using div tag. 2. print the div tag. Thank You.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0