.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Print PDF Document from Web Form

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :ASP.Net

I have to have a web form that allows the user to print a PDF Document from a web form or web service.  The requirements are that the user will not see the pdf before printing, the call to print will actually happen on the Web Server it's self, the web server does not have adobe, and the document has to print to a Network printer that the web server is not setup to print to. 

Can someone point me in the right direction?

View Complete Post

More Related Resource Links

Infopath 2007 print view in browser enabled form with Print button


Hi i create a  print view brower enabled form in Infopath 2007 with header and footer. In Infopath works fine. Margin was ok, header and footter to. But then i try to print this browser the margin, header and footer it changes to default setting of browser ? I try also create a print button in form with VS 2008 code, but method :

this.print(); not working.

It is possible to print the "print view" in browser as the same like in Infopath 2007? Does anyone have the code how to create a print button in C# on browser enabled form?

click a button to print current window form

how can i click a button to print current window form? i don't know how to set and define something? anyone give me example for my reference   thanks.

Changing fields while updating an InfoPath Form to a SharePoint 2010 Document library

My document library has following EventReceiver: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListTemplateId="101"> <Receiver> <Name>EventReceiverDocumentLibraryItemUpdating</Name> <Type>ItemUpdating</Type> <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly> <Class>EventHandling.EventReceiverDocumentLibrary</Class> <SequenceNumber>10000</SequenceNumber> </Receiver> </Receivers> </Elements> Updating a browser enabled InfoPath form in the document library fires following event: Public Overrides Sub ItemUpdated(ByVal properties As SPItemEventProperties) Try Me.EventFiringEnabled = False properties.ListItem("Lastname") = "Testperson" properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = True properties.ListItem.SystemUpdate(False) ' solution 1 properties.ListItem.Update() ' solution 2 properties.ListItem.UpdateOverwriteVersion() ' solution 3 properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = False Me.EventFiringEnabled = True MyBase.ItemUpdated(properties) Catch ex As Exception Me.EventFiringEnabled = True E

Print Button +code in form

Using sharepoint 2010 and designed a simple form. How can I add the Print functionality to the ribbon from standard SP2010 NOT using Infopath? thx

How to open the stored document in form library as readonly

Hi,    I have a library, am storing the form in this library, when ever the new form is created, the mail will send to the administrator for getting approval. Now i want to open the stored library form in read only for the administrator. How can i achive this?

Print Form View and expanding text fields?

The form i'm editing has a small text field with a scroll bar that users enter quite a bit of data.  I'm wondering how to create a print view for the form that will expand that field to match the size of the content text. Does that make sense?

Can't paste text into an Infopath form and see it with print preview

I have a user who says that they can't view any of their text that they cut and paste into the fields of a form when they choose Print Preview, in the forms library.  They're using IE8 to access the SharePoint site. When I access the same form in the same library from any browser from my computer, I can view pasted text in any field when I click Print Preview. Anyone see this before and can help me?? Thanks!    

Automatically print a document

I want to be able to automatically print a document to a selected printer at a given time, i.e. printer 1 @ 10:00, Printer 2 @ 10:15, this is to be unatended once the setting have been made.Any help would be appriciated Steve

how to merge contents of a form library and picture library into a report (word or pdf) document

Hi all           I want to generate a report  containing data from a form library and pictures from a picture library. I am able to generate ms word report from data filled in form library using http://www.bizsupportonline.net/infopath2007/convert-infopath-form-into-word-2007-document-xslt-c-sharp.htm . . But now actually i need to merge images from a picture library into that word  document . thnxs 

Is it possible to use a webpage form in the workflow process instead of using a document?

We need to move our current IT work request form to sharepoint workflows.  The reason for this is because we need to be able to have an approval process for non-managers who fill out the IT work request form and then submit.  How do I get started adding a webpage to the approval process in workflows?  I'd like it to work exactly how adding a document, from the document library.  If it is possible, can someone direct me to a tutorial out there or give me some insight? Thanks, Shawn

Altering in-document form layout for Document Library Columns



My users need to add metadata to documents they check out of a Document Library while they are in the document. That works fine (the forms appear at the top of the Word Document, underneath the task bar). However, the layout of the forms is kind of bad. Is there a way to redesign the forms in the top of a word document so that they look better?



how to print a web form using asp.net c#


how to print a web form using asp.net c# if i use the javascript there's a header and footer of the page and i dont like that...

any idea?

InfoPath 2007 Form Content Type does not save as infopath form but as xml document.


I have a couple of infopath forms deployed to sharepoint as content types. Normally, when a user creates a new document of an infopath content type, the form opens in browser mode and ,when the user fills in the form and saves the form, a new document is created in the document library with the correct icon and progid.

This was before... Now, whenever I save a form, the form submits correctly, i see the file in de document library, BUT it has the icon of an XML document, all the infopath functionality is gone and when I click the file, I get a save as dialog...

The form itself hasn't changed that much and even when I redeploy a version that worked before it still does not work. However, when I create a new doc lib and associate the malfunctioning form there, the behavior is normal and i can still reopen the saved form.


Little sidenote: I have 7 different forms that now do not work on my test machine. It used to be only one, but after redeploying them, all of them have the same problem. Now when I deployed these forms in a production environement, the same thing started happening there. So I stopped the deployment and in production there is just the newly deployed form that does not work.

I have already tried reassociating the form to the doc lib. And everything looks normal in central administration.

Any suggestions?


Getting error msg while trying to upload a document inot the document library using the form which i


I have designed an upload form with the columns that have to be filled in while uploading a document into the document library.The form is designed in .net.

I get "Error Access Denied" message when i try to upload the document using that upload form.When i go back to site,the document is uploaded in that particular document library.But this problem doesnot exist when i upload the document as admin.There is no " Error Access Denied" message.I have checked the document library permissions.The problem is not with the permission to that particular document library.

Can someone help me out in this issue?

Is there an alternative to the VB compatibility library and the default "print document" interface?


When I first converted a program from an older version of VB to
VB .Net, I used the printer compatibility library with good success.
It treated the printer as a device.  Print this, print that, start a new page,
and so on.  Recently, when adding the printing of graphics, I started running
into out of memory conditions.  I discovered that I could use the base
.Net print capabilites to resolve this problem for the graphic images.

If all I am printing is the graphic images, this is not too bad.
However, the application I have has a mix.  Print this form followed by
another form followed by a graphic  followed by another form.  Each form
and graphic could print on a single page or take multiple pages.  The default
.Net approach of a call back to get each page becomes extremely clumsy.
Each print routine needs to remember which page it is currently on between calls and the print distributing routine needs to keep track of what form is currently being printed.

Is there another printing interface available?

Merge Upload form and editform in Document library upload document



I have a document library.  When the user click on the upload, I want to display an entry form that have: Name, description, keywords and file with the browse button. All those fields should be on the same page. 

The problem is that by default when the user click on upload button, it get redirected to _layouts/Upload.aspx which ask the user to browse for the document, when he click ok, it is redirected to Forms/EditForm.aspx to provide the Name, description and keywords field. 

My client do not want to have two pages, he just want to enter and upload the file all in one page.

Any ideas how can I accomplish this?

Thank you,



Print Document Allignment


Hi Guys, I want to Print Student ID card from my Grid View Control.

PrintDialog pDlg = new PrintDialog();
PrintDocument doc = new PrintDocument();
pDlg.Document = doc;

My Problem is i need to allign my data into doc, how can  i do this... 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend