working with dynamically generated PDF with Win Mobile browser

ASP.NET

    Sponsored Links

    Next

  • 1. RedirectToMobilePage in MobileBaseControl
    I am in the process of updating a mobile web application from 1.1 to 2.0. The application uses a MobileBaseControl that contains the footer on the mobile page. Basically it contains links to home, logout, etc... The link event does the following: MobilePage mpage = new MobilePage(); mpage.RedirectToMobilePage(somepage, false); Under 1.1 it was working fine. However under 2.0 I get the error: Response is not available in this context. I saw some other posting about using this.RedirectToMobilePage(somepage, false). However since this class inherits from MobileBaseControl, I can't do that. Does anyone have any ideas? Thanks, Roger
  • 2. Any recent Good Book For .NET MOBILE Develpment
    I am a C# programmer. I'm looking for a good book about .NET MOBILE development any advice. Thanks in advanced.
  • 3. Strange behavior on pocket IE
    Hi all, i developed a web page that adds an HTML INPUT Element on submit via AJAX. By the next submit i want to check the value of the added INPUT element. In IE 7 i call document.getElementById(id); and in the attribute VALUE is my text of the INPUT field. Everythins is fine. In PIE i call document.all[id]; and the attribute VALUE ist empty. Why? What can be the problem? Thanks

working with dynamically generated PDF with Win Mobile browser

Postby David C » Fri, 13 Jun 2008 17:42:18 GMT

Hi,

I have a page that dynamically generates a PDF file using
ActiveReports.

The code that does it looks like this.

m_stream.Position = 0;  //this is memory stream
Response.ContentType = "application/pdf";
Response.BinaryWrite(m_stream.ToArray());
Response.End();

Of course this is only a part of the code, but the point is, I am
using the Response object to make this happen.

This works beautifully with the desktop browser.  The Acrobat reader
launches, and I see the PDF file inside the browser. But not so with
Win Mobile 6.0 IE.

* The PDFViewer does not launch

* It asks me if I want to save

* So I say yes.  It saves with the .ASPX extension!

* And it does not let me change the extension.  I am stuck with the
ASPX extension, and there is no tool in WinMobile 6.0 that I know of
that would allow me to do that.

Thanks in advance.

Similar Threads:

1.Problem with multi-key foreign constraints (Win Mobile Prof 6 and Win Mobile CE and Datasets)

2.no touch deployment worked on Win 2000 doesn't work on Win server

Hi,

We have a .net windows form application that runs under no touch deployment. 
It has been working fine until just recently we upgraded our deployment 
server from windows 2000 to windows server 2003.

The problem is that when the client loader invokes the app by linking to the 
deployment server, all the exe and dlls get downloaded to the workstation 
properly, except the .config file (actually, it is not named as .config, but 
.qlconfig, for working arround asp.net's security checking, and it has been 
working fine on win 2000). Why is Windows server 2003 act differently? What 
should I do to make it work?

Thanks

Feng

3.Win CE 5.0 or Win Mobile 5.0

4..png doesn't work for dynamically generated images, but .jpeg and .gif does

I am creating a web page that dynamically generates an 
image, which is placed in an Image control. Everything 
works fine for .gif and .jpeg files. I would prefer 
using .png format, but that doesn't seem to work.

Here's how it's setup.

The Image control has URL property "image.aspx".

The Page_Load method of image.aspx contains the code

{
   //generate image
   Bitmap bitmap = ...
   //Return the image
   Response.ContentType = "image/png";
   bitmap.Save(Response.OutputStream,ImageFormat.Png);
}

If ContentType is "image/jpeg" and bitmap.Save's 2nd 
parameter is ImageFormat.Jpeg, everything works fine. 
Same for ContentType = "image/gif" and bitmap.Save's 2nd 
argument is ImageFormat.Gif. When the code appears as 
above, the Image control displays the dreaded "X" icon 
indicating that the image can't be found.

Note that I can use a different version of the Save 
method for the bitmap to write the .png image to a file. 
I can then open the file successfully in IE.

I am using VS.NET 2002 and .NET framework 1.0.

Thanks for your help.

Chris Jones

   

5.ASp.net Mobile Forms authentication on Nokia Mobile Browser 4.0

Hi All

Ive written a portal mobile portal in vb.net that I want to secure to
only authenticated users. I am having great difficulty doing this, as
when I test in the nokia wap simulator 4.0 (most of the users will
have nokia browsers) I cant seem to store any state.

When I authenticate the user, NMB 4.0 doesnt reflect the persisted
information. THe web config file is set to not use cookies and the
state is persisted if I test it with a an actual nokia 6230(GPRS), the
open wave simulator and also normal IE browser. Any Help is
appreciated.

 (details of the authentication Im using is below):

Dim username As String = "RyanMalone"
        FormsAuthentication.Initialize()
        Dim strRole As String = AssignRoles(username)

        'The AddMinutes determines how long the user will be logged in
after leaving
        'the site if he doesn't log off.
        Dim fat As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, _
         username.ToString, DateTime.Now, _
         DateTime.Now.AddMinutes(1), False, strRole, _
         FormsAuthentication.FormsCookiePath)
        Response.Cookies.Add(New
HttpCookie(FormsAuthentication.FormsCookieName, _
         FormsAuthentication.Encrypt(fat)))
        Session("Telco") = "Optus"

6. win Ce 4 install not working on win ce 5

7. Testing on win xp and win Vista, backup does not work

8. PDF Writer for Win CE



Return to ASP.NET

 

Who is online

Users browsing this forum: No registered users and 91 guest