Streaming To Pdf Causes "Adobe Reader Can't Open File" Error
Jan 15, 2011
I am using VS 2010 and C#. I am trying to create a pdf file in web application. I am trying to convert a dataset to pdf file. The pdf file is getting generated, but when i try to open the pdf, i am getting the error as "Adobe reader could not open "sample.pdf" because it is either not a supported file type or because the file has been damaged" How to fix this?
View 4 Replies
Similar Messages:
Dec 10, 2012
I am using the code from: [URL] ....
Everything seems to work, expect when I try to open the PDF file Adobe Reader says:
"Adobe reader could not open 'filename.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)."
I tried opening it in Adobe Photoshop and was not able to there either.
View 1 Replies
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
Jan 28, 2010
How to determine whether the Adobe Acrobat Reader has been installed or not on the client PC?
View 7 Replies
Jul 25, 2011
Our ASP.NET application allows the users to review any number of PDF forms. A simple listbox holds filenames and the forms are displayed inside a standard iFrame. The setup is simple and effective: when the user clicks on a filename, that filename is loaded into the iFrame, and shown to the user.
Users are allowed to digitally sign the forms. For appearance purposes, a bitmap of the user' signature is generated and placed in the appropriate location of the PDF form.
The bitmap file format is GIF, and the background is transparent.
We use iTextSharp for form-filling, and we also use iTextSharp to place the bitmap on the forms. Nothing special.
We can readily verify that the signature bitmap is correctly placed on the form, and that the bitmap itself is definitely transparent.
Problem 1:
After placing the bitmap of the user' signature on the form, the form is reloaded and displayed to the user (for verification) and, in most cases, the forms do not display the bitmap. Opening the PDF reveal that the bitmap has been placed and is definitely visible in Adobe Reader (9 and 10 - these are the versions available for testing).
Experimentation and quite a bit of research seems to suggest that the problem lies in caching. One of the possible solution/suggestion is to append a time-stamp or a GUID to the URL, when loading the form after applying the bitmap. In theory, this should prevent Adobe Reader from using a cached copy of the PDF form.
We have tried appending a time-stamp and/or a GUID, without any success: the forms still display without the bitmap. At the risk of repeating myself: the PDF form is correctly signed, and the bitmap is correctly placed. It is just not visible.
This problem seems common to users running the application on intranet web servers (IIS 7). The one application instance running on public web server (IIS 7) does not seem affected by this problem.
Problem 2:
As mentioned, the GIF file generated by our application has a transparent background. In almost all cases, Adobe Reader (9 and 10) seems to understand and respect the transparency of the bitmap.
In one very peculiar case (when the application is running on a Windows 7 64 bit machine with IIS 7), when the bitmap is placed on the form, it becomes opaque (complete loss of transparency).
Again, the problem seems related to Adobe Reader, because the bitmap being applied positively sports a transparent background.
View 1 Replies
Jan 21, 2011
My asp.net app used Crystal report to display as pdf file.
If I open the report in my pc (newest version, Adobe reader 9), it is ok but once I open app in web server (Adobe reader 8), it display a blank screen.
View 2 Replies
Jan 31, 2011
In a VB.Net project I use the Adobe PDF Reader (AxAcriPDFLib) control to display a preview of a selected PDF document whereafter the user can double-click upon the selected listbox item to enjoy a full screen view of the relevant PDF document. see the attached sample in this regard. Is there any way to emulate this in ASP.Net?
View 5 Replies
Apr 23, 2010
I am using rdlc in .net 2008. i made a column in rdlc as hyperlink and on clicking the hyperlink i want to open a adobe flash player.
View 1 Replies
Mar 3, 2011
When i try to open a csv file from my asp.net 3.5 app by clicking on the link provided, a file download dialog box appears.When i click on the open button from there , i get this eror
C:Documents and settingsUserNameLocal SettingsTemporary Internet FilesContent.IE5X9TXTM06myfilename.csv could not be found .Check the spelling of the file name and verify that the file locationis correct?
Wjy am i getting this error? I am trying to open a file and it complains about file not found in the Temporary Internet Folder.I tried deleting the temp intrnet files.Dint work.I have IE 7 on xp professional sp3. Also i am streaming the file from the application. This happens only to some files and the rest of the files , i can open .
View 1 Replies
Oct 22, 2010
If a web designer created a Adobe Illustrator file with 10 templates for the website, can I use the file in the asp.net web form?
View 1 Replies
Nov 24, 2010
I have built an ASP.NET (.NET v4) application in VS 2010. It is working just fine. But when I try to create deployment package (so I can deploy it in our test IIS 7.5 Server), it gives me error like this,
Error 1 Could not open Source file: Could not find file 'C:11-2 estobjDebugCSAutoParameterize ransformedWeb.config'. 0 0 test
Thing is in past, I had deployed the SAME application using the SAME method.
View 2 Replies
May 7, 2015
I would like to ask why I encounter this error when multiple user accessing in my online page.
Here is the error message.
Execute Reader requires an open and available Connection's current state is connecting.
View 1 Replies
Oct 21, 2010
The users have requested the option to "generate" an excel file representation of GridView contents.
Does anyone know how to do this without saving the file to the server but rather just streaming it to the user from memory?
My below code is working
streaming directly from memory instead of using physical path of server machine then saving the file on client machine
Private Sub generateExcelSheet()
Try
Dim weekFrom As String = DdFromWeek.SelectedValue
Dim weekTo As String = DdToWeek.SelectedValue
[Code]....
View 4 Replies
Apr 16, 2012
i hve created xsd files for reporting services & which was working fine till few days back currently when the application was executed i get the results output only problem is when i open xsd file & try to configure or prieview data i get the below errors
--------------------------- Microsoft Visual Studio --------------------------- X_._LEAVE.Fill,GetData () could not be previewed. Unable to find connection 'ConnectionString' for object 'Web.config'. The connection string could not be found in application settings, or the data provider associated with the connection string could not be loaded ---------------------------
[Code] .....
View 1 Replies
May 15, 2010
1. what is streaming how we download File through Streaming.
2. what is service Behaviour and operation Behaviour In servic Contracts . plz Explain Me In brief
View 2 Replies
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
Oct 11, 2010
I have a folder called GUI. Inside GUI thers another folder called PDF and inside this folder, there are some PDF files. This folder (GUI) is uploaded to the server too. Then I have a WebForm with some ImageButtons. When I click one of these ImageButtons, I want the file to open in a new tab. I tried with the following code:
[Code]....
As you can see, I build the path using the tooltips of the different ImageButtons. The ToolTip = File Name I want to open. When I try this in debug mode, it works. It opens the pdf file in a new tab. However when I publish my website and upload it to the server... it doesn't work... when I click an ImageButton I get the following exception: No application is associated with the specified file for this operation
Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation
Source Error:
[Code]....
Stack Trace:
[Code]....
[Win32Exception (0x80004005): No application is associated with the specified file for this operation]
LandingSite.LnkRelease1_Click(Object sender, EventArgs e) +215
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +108
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Version Information: Microsoft .NET Framework Version:2.0.50727.3607; ASP.NET Version:2.0.50727.3082
View 3 Replies
Jul 17, 2010
I am using below code to generate word document using assp.net/c#.net, please tell me where i am missing it is generating word file and all contents are their.but problem is that when i open it it gives me error:"The Office Open XML file filename.doc cannot be opened because there are problems with the contents"
and after clicking ok i get my required file.remove this error.
in error details:The file is corrupt and cannot be opened after it again gets a error message:"word found unreadable content in myfile.do you want to recover the contents of this document? if you trust the source of ths document,click yes"
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office;
[code]...
View 1 Replies
Aug 31, 2010
I have a WCF service that returns a stream object. But for some reason i get a corrupt zip file back which i am streaming.
Contract Code
[ServiceContract(Namespace = "http://schemas.acme.it/2009/04/01")]
public interface IFileTransferService
{
[OperationContract(IsOneWay = false)]
FileDownloadReturnMessage DownloadFile(FileDownloadMessage request);
[Code].....
View 2 Replies
May 4, 2010
I'm having a problem with file streaming where this file is a video that is streamed to a FLV player.
Essential components for understanding the problem:
- An asp.net page called Viewer.aspx that has de FLV player incorporated in the HTML.
- An asp.net page (It could be an http handler but in this case it's not) called Downloader.aspx that gets a flv file from somewhere on the web and writes it to the Response Output Stream.
Everytime Viewer.aspx is called, it makes Downloader.aspx the source of the the FLV player and the video is correclty presented and streamed into the player.
The problem I am having now is that any user interaction with the page (even typing an URL inside the same website domain on the browser address bar) becames hung until the video download ends.
I can measure this video download with HTTP Watch for example, and confirm that just after the video download into the player ends, the command issued by the user is immediately processed (or the browser goes to another page if the user typed a new address in the browser address bar).
I tought that it could be the limit of 2 connections per domain, but HTTP Watch only shows one active connection (the video download into the FLV player).
Even if it was this 2 connections limit, I think a nice solution would be to somewhat detect the user interaction with the page and abort that video download.
View 1 Replies
Apr 16, 2010
I'm in a bit of a pickle here. I'm Binding the name of file to a LinkButton and intending to open that file on the LinkButton' click. I have the LinkButton in the TemplateField of a GridView control. Below is the code I'm using : And the Event Handler goes like : protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("goto")) { fileToOpen = e.CommandArgument.ToString(); Response.Redirect(path + fileToOpen); } }
View 3 Replies
Oct 21, 2010
I have a web page with a gridview control and a button for Exporting to Excel
I get following error when exporting to Excel.
"The file you are trying to open, 'someFileName[1].xls, is in a different format than specified by the file extension. Verify that file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"
Clicking Yes opens the file. I would like to avoid showing the above error to the users.
Following code is used from the click event. I've left the commented code here to show what I've tried based on results from internet search. I have Microsoft Office Excel 2007 on local PC.
[Code]....
View 1 Replies
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
Feb 22, 2013
I have created a pdf file using aspose and need to open it without saving the pdf.Is it possible.
View 1 Replies
Aug 2, 2010
I am trying to open a file share link from the window.open ... but its adding the http://localhost/vdir/ before the path can any one say what is the problem?
View 1 Replies