Web Services - Printing PDFs Server-side Using Acrobat Reader?

Apr 15, 2010

I have been presented with a problem which requires me to print PDF files from a server as part of an ASP.NET web service.

The problem is further complicated by the fact that the PDF files I have to print can ONLY be printed using Adobe Reader (they were created using Adobe LiveCycle and have some strange protection in them).

This piece of code seems to do the trick in the Visual Studio development web server, but doesn't do anything when the site's running in IIS. I'm assuming this is probably some sort of permissions issue!?

Dim starter As ProcessStartInfo
Dim Prc As Process
' Pass File Path And Arguments
starter = New ProcessStartInfo("c:program files...AcroRd32.exe", "/t ""test.pdf"" ""Printer""")
starter.CreateNoWindow = True
starter.RedirectStandardOutput = True
starter.UseShellExecute = False
' Start Adobe Process
Prc = New Process()
Prc.StartInfo = starter
Prc.Start()

View 1 Replies


Similar Messages:

How To Check Adobe Acrobat Reader On Client PC

Jan 28, 2010

How to determine whether the Adobe Acrobat Reader has been installed or not on the client PC?

View 7 Replies

Print Pdf File In Acrobat Reader Using Javascript And Close It?

Feb 23, 2010

we are displaying a reporting services report as a pdf document in acrobat reader. when the user clicks on the print in the acrobat reader, I will like to print the report and close the report. The user should be able to print the report only once.

View 2 Replies

Php - Make Server Side Form Validation Compatible With Screen Reader?

Feb 23, 2010

if screen reader fill any content wrong then how to give info (if javascript is disabled) to user to go that field any fill the correct value. with jvascript we can show javascript alert but if js is disabled then? I need solution for asp.net 20 and PHP both.

View 1 Replies

Web Forms :: Button For Printing All Images From Server-side?

Oct 1, 2010

i have 3 images in my image folder like ~/img1.jpg and ~/img2.jpg and ~/img3.jpg .

i need a button in my webform to do this :

1- print each image in separate paper .

2- in print page setup > all margins = 0

3- in print preview >> scale = 70%

View 2 Replies

How To Execute Web Services Asynchronously In Server Side When Called By JQuery's .ajax

Mar 22, 2011

I have an ASP.NET (3.5) web page which calls a few web methods (SOAP based) using jQuery's .ajax method. The web methods implement 'ScriptMethod' attribute and return JSON data. The web service file (asmx) is local to the same project.

I noticed these web methods execute synchronously on the server which means they run sequentially and affect performance negatively, some methods are waiting, when some of them are slow.

I read this article and I am not sure if I understand that WebMethods which implement Scriptmethod can run synchronously only (they implement IHttpHandler not IHttpAsyncHandler).

If this is true, I might have to change the design. I am looking for other designs, maybe like using WCF, where the browser can call webmethods using JavaScript and the web methods run asynchronously on the server.

View 2 Replies

Open PDF File In Adobe Acrobat On IIS Server From Client

May 3, 2010

I read the thread on this topic and tried using "Process.start(mypdf.pdf)" to open the PDF file. I was able to get "Process.Start()" to work perfectly within VS2008 on the built-in server but not IIS; when I am in the development environment it works great, but when I deploy the application and run it it does not work. What happens when I run outside of the development environment, I can export the PDF file to the directory on the IIS server, and the client can also delete the file from the IIS server, BUT, inbetween the export and the delete commands, I have the Process.start command so that the user can open the file and do whatever they need to do; print it, print partially or save it locally ect.

After it exports the file to the server when the exectue "Process.start" occurs, the screen just blinks and there is no error message? I tried many options using Process.StartInfo but no luck. I also tried to to use Process.Start() with a text file (.txt) and had the same result, so it doesn't look like an adobe acrobat problem. I do have acrobat running on the clients as well as the server. I don't think it is a security issue being the exporting and deleting work. Is this the wrong command to use? The web server is IIS7, I am using VS2008 VB.NET and it is a Web application. I need to demo this to the client in 4 days and I need to have this working.

View 4 Replies

SQL Reporting :: Set Up A Secure Report Server To Publish Individualized Pdfs?

Mar 9, 2010

I am interested in learning how to set up a secure report server with which I can publish individualized reports to my constituents. I know that banks and brokerage firms can do this, but I am not sure how it is done. I want to publish documents for an academic institution (grades, bills, transcripts, etc). I know some ASP.net and I am pretty fleuent in Crystal Reports. I am considering using a product like pdf-explode to disseminate reports via email, but I would really like to learn how to set up a secure site for my constituents and have them view the reports there.

View 1 Replies

Crystal Reports :: Printing On Client Side Using JavaScript

May 7, 2015

I need to print Crystal Report using JavaScript and a Button on client side without any server side ASP.Net code.

View 1 Replies

Web Forms :: How To Find All The Web Services And Windows Services Running On A Server

Feb 4, 2011

How to Find All the Web Services and Windows Services Running on a Server in ASP.Net. I have the server details with me and want to find all the Web services running on it.

View 1 Replies

ADO.NET :: Can't Get Reader.hasrows And Reader.read To Work Together In Code Behind

Feb 22, 2011

I have some code in my vb.net code behind that queries a database, and if there is data, outputs it from the codebehind to a datalist on my asp.net page. In addition to sending the data to the datalist on the page, I need to take the value from "mbillaty" that is returned from the sql query, and have that value be the selected value for a drop down box also on the page. I can get either the datalist to fill, or the selected value for the dropdown box to be selected depending upon which bit of code I place before the other (ARGH), but I can't get them to both work together on the page. What am I doing wrong?

[Code]....

View 2 Replies

SQL Server :: Get Return Value From Server In C# Through Data Reader?

Feb 5, 2011

I want to take my return value from sql server to c#.

my code

SQL SERVER:

ALTER procedure [dbo].[userss](@email varchar(100),@password varchar(25),@name varchar(250),@DOB varchar(20),@acc_vari int,@ip_address varchar(50),@vari_code varchar(7) )
as
begin
declare @uid int
select @uid=uid from users where email='12we'
if(@uid>0)
return 0
else
insert into users values(@email,@password,@name,@DOB,@acc_vari,@ip_address,@vari_code )
end

In this i want to take return value "return 0 " from sql server to c#.

View 3 Replies

SQL Server :: Parameter In Command And Execution Of Data Reader?

Mar 9, 2011

[Code]....

why I am not getting the desired result. I want to retrieve records in DataReader and still I am not getting any result.

View 4 Replies

SQL Server :: Invalid Attempt To Call Read When Reader Is Closed?

Jan 28, 2011

I have a function which allows me to quickly load SQL results into an SQLDataReader.

This is a very effective way for me to do this as it can be used for inserts, updates and selects very easily throughout my code.

However, I have noticed some potential memory issues with my site while using this (I keep having to do iisresets when working locally because all the pools are used up) so I am trying to use "Using" rather than "Dim" in an effort to ensure that the connection is always disposed.

I call the function in the following way:

Dim RS As SqlDataReader = SQL.Exec("sp_MyStoredProcedure " & ID)
If RS.Read Then
Return RS("Column_Name")
End If
RS.Close()

[Code].....

I now get the error "Invalid attempt to call Read when reader is closed" when calling the function on the line "If RS.Read Then".

View 24 Replies

How To Use The Acrobat Driver To Covert Web Page To Pdf

Jun 15, 2010

How can i use the acrobat driver to covert web page to pdf , i have a icon on my browser. How can i use that in ASP.NET to convert the web page to pdf pro grammatically.

View 2 Replies

C# - Acrobat Opening In Full Screen Mode?

Jan 27, 2010

I am having an issue with displaying a PDF in an iframe in asp.net. When the pdf shows up it is showing up without the Acrobat toolbar that allows the user to zoom and print. This is causing a major hassle for our customers because they cannot read the PDF in the size that it is. If you try and set Acrobat to not show the PDF in the browser and browse to that page you get a message saying that it is trying to open it in Full Screen mode. how I can make it not do this from the code? Below is the code I use to stream the PDF to the browser:

Public Shared Sub StreamPdfToBrowser(ByVal doc As Document)
Dim Ctx As HttpContext = HttpContext.Current
'// Clear any part of this page that might have already been buffered for output.
Ctx.Response.Clear()
Ctx.Response.ClearHeaders()
'// Tell the browser this is a PDF document so it will use an appropriate viewer.
Ctx.Response.ContentType = doc.DisplayFileType
Ctx.Response.ContentType = "application/pdf"
Ctx.Response.AddHeader("content-type", "application/pdf")
'// IE & Acrobat seam to require "content-disposition" header being in the response. If you don't add it, the doc still works most of the time, but not always.
'// this makes a new window appear:
Response.AddHeader("content-disposition","attachment[inline]; filename=MyPDF.PDF");
Ctx.Response.AddHeader("Content-Length", doc.DisplayFile.Length)
Ctx.Response.AddHeader("Content-Disposition", "inline; filename=E-Sign Specification Report.pdf")
'// TODO: Added by KN to possibly fix UA issue
Ctx.Response.ContentType = "application/pdf"
Ctx.Response.AddHeader("content-type", "application/pdf")
'// Write the PDF stream out
Ctx.Response.BinaryWrite(doc.DisplayFile)
'// Send all buffered content to the client
Ctx.Response.End()

End Sub

View 1 Replies

Server Side - Themes Won't Work When Using Server Side Tags

Apr 8, 2010

The code for the asp.net page is:

<div class="facebox_content">
<% if (CurrentUser.Role == "Free")
{
%>
<table cellpadding="0" cellspacing="0" style="border-collapse:collapse;width:380px;">
<tr>
<td>

User Name :

</td>
<td>

Membership Cost :

</td>
</tr>
<tr>
<td style="width:190px;">
<asp:TextBox ID="txtUserName" Enabled="false" runat="server" Text="<%= CurrentUser.Name %>"/>
</td>
<td style="width:190px;">
<asp:TextBox ID="txtCost" Enabled="false" runat="server" Text="2000"/>
</td>.........

View 1 Replies

How To Linearise PDFs File In C#

Feb 18, 2011

I am looking for code that linearize PDFs file. that show page-by-page into the user's browser, so the user doesn't have to wait for the whole document to download before starting to view it.

View 1 Replies

Printing Text Through Print Server On C#?

Jun 30, 2010

I need to print a text content, I use this code for this, but don't work, the paper is empty

PrintDocument myPrintServer = new PrintDocument();
myPrintServer.PrinterSettings.PrinterName = @"\servernameprinterName";
StringReader myReader = new StringReader("test string content");
myReader.Close();

View 2 Replies

IE Not Showing PDFs With Caching Disabled

Nov 10, 2010

I've been asked to implement a security requirement that we instruct browsers not to cache sensitive data. This is all fine for the ASPX content using the standard instructions:

Response.Expires = -1;
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();

However when I set these headers for PDF downloads, IE8 won't show the PDF (haven't tried other IE versions yet, kinda moot, I need it working on all of them, even IEfreaking6). Seems to work in firefox 4 beta, but I haven't double checked that it's definitely not caching it. Here is the abridged version of the code I'm using to serve the PDFs:

Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.Buffer = true;
//This stops the PDFs from being viewed :(
//Response.Expires = -1;
//Response.Cache.SetCacheability(HttpCacheability.NoCache);
//Response.Cache.SetNoStore();
Response.ContentType = mime;
Response.AddHeader("Content-Disposition", disposition);
Response.BinaryWrite(file);
Response.End();

Where in the case of PDFs the mime type is set to: private const string mimeTypePDF = "application/pdf"; The disposition is set to: var disposition = String.Format("{0};filename="{1}"", SendInline ? "inline" : "attachment", Path.GetFileName(filename));

I'm going to play-around a bit more, maybe forcing them to download as mimetype "application/octet-stream" might work, but that would stop the nice open PDF's in a new browser window from working. Has anyone had any success with preventing IE from caching PDFs from the server side and successfully displaying them?

Just to give a clear example about what happens. In one scenario user's can select a bunch of reports from a list, these are compiled into a PDF and the PDF is shown in a new browser window. With the caching enabled the browser window opens, but remains resolutely blank.

View 2 Replies

Web Forms :: Slow Printing On Win Server 2008?

Jun 30, 2010

I am trying to print in an ASP.Net website using the code below and the printing is VERY slow. It takes about 5 minutes for the first document but then subsequent docs are printed without delay:

The printer is Xerox 5645. The server OS on which asp.net website is hosted is win 2008 x64.

[Code]....

View 2 Replies

Forms Data Controls :: Printing Html Code Instead Of Printing Html View In PDF?

Dec 22, 2010

I am using formview control to generate invoice. But instead of printing html view it is printing html code in PDF. I am doing like this:

[Code]....

View 2 Replies

Convert From Office Docs / PDFS To HTML

Jul 27, 2010

I am currently working on a project where I need to secure access to downloadable files. The solution I want to implement is to have two buttons next to each document. One that says Editable and the other read-only (depending on the users permission they will see one of these or both). The editable will work normally with the browser dialogue opening to say open / save the document. That is the easy part. The read-only button needs to open the document without caching anything (in temporary internet files) on the client's machine for security reasons or give the ability to save it to their local machine.

The best Idea I have for this is to convert the document to HTML on the fly and then redirect the user to this page. We can then turn caching off on the site so the HTML isn't cached (I know they can then right-click and save the HTML or copy the text,etc.. but that is deemed acceptable). Does anyone have an alternative solution than this (or have an easy way this can be achieved)? I don't want to install Office on the web server or pay heavily for a third-party tool like Aspose.

View 2 Replies

Web Forms :: Print Multiple Files Or PDFs?

Oct 19, 2010

I am creating a web app to basically allow the user to select multiple files, specifically pdfs that have already been created on a network path, and print whichever ones they want. Can someone point me to the best way to accomplish this? I have done a lot of searching, with no good results so far.

View 3 Replies

Web Forms :: How Do You Write To A Client-side Control (text Box) With Server-side Code

Jan 6, 2010

If I have a standard HTML textbox

[Code]....

but got a readonly error.

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved