.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

Hiding the document name when launching a PDF document

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
I am launching a pdf document  using either: 1. Response.Redirect("filepath/document.pdf"), or2. Response.ContentType = "Application/pdf"    Response.WriteFile("filepath/document.pdf")    Response.End()Both methods successfuly launch the PDF document displaying the document path and title in the title bar. For security reasons I'd like to HIDE the document title. Can someone advice how this can be done? (How can a PDF document be launched without showing the actual document's name)   

View Complete Post

More Related Resource Links

Document library hiding pdf files' tool bar

Hi all, I have a requirement that the Sharepoint pdf documents should have the toolbar hidden in order to prohibit users from downloading and printing the file. The only way I can do this is to create a content editor web part, using HTML to open the pdf file and add '#toolbar=0' after the pdf file name. I am wondering if I can also add '#toolbar=0' to the Sharepoint document library's pdf files? Thanks!

Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.

SharePoint Document Workspaces for Developers

Office 2003 is being released this month, and a cast of supporting applications is already available. One of these is Windows SharePoint Services 2.0, the free team add-on for Windows Server 2003. If you're not familiar with SharePoint Services basics, take a look at What Developers Need to Know About Windows SharePoint Services. In this article, I'm going to drill into one key place where SharePoint and Office 2003 overlap: document workspaces

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

SharePoint document migration challenges when migrating files and folders

There are several challenges when migrating documents to Microsoft SharePoint. While these challenges can be overcome, they are a real pain if the migration source, content and file systems are not SharePoint friendly.

Charset Problem with dynamically generated Word Document


in my asp.net web application i am dynamically generating a word documnet out of a sql data. I have set the char set UTF-8 during the doument creation in code but still when i open the generated document and check it char set .. it is always windows-1252 not the one that i have set. My sql data in the document have special characters whihc can only be understandable using the UTF-8 charset otherwise its always ?T written in place of an apostrophy . Pasting my code here..

         HttpContext.Current.Response.ContentType = "application/msword";
         HttpContext.Current.Response.ContentEncoding = System.Text.UnicodeEncoding.UTF8;
         HttpContext.Current.Response.Charset = "utf-8";
         string strFileName = "Details" + ".doc";
        HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;filename=" + strFileName);
        StringBuilder strHTMLContent = new StringBuilder();
        string strMessage = " ";
        DataView abstractview = (DataView)dsAbstract.Select(DataSourceSelectArguments.Empty);
        foreach (DataRowView row1 in abstractview)
            strMessage += "<table border='1' cellspacing='0' cellpadding='5' width

Embed word document inside excel



I am using ASP.NET and C# 2.0 and working on web application.

I want to embed a word document inside a excel sheet.

How to embed word document inside excel.

Thank you



Office Development: Manage Metadata with Document Information Panels


Here the author uses Document Information Panels in the Microsoft 2007 Office system to manipulate metadata from Office docs for better discovery and management.

Ashish Ghoda

MSDN Magazine April 2008

Advanced Basics: Setting Word Document Properties the Office 2007 Way


The last time I wrote this column (March 2006), I shared an application that allows you to update all the Microsoft® Word documents in a folder and its subfolders. Each time the application finds a document in the specified path, it updates the document properties to match those you specified in the application.

Ken Getz

MSDN Magazine June 2006

Advanced Basics: Set Word Document Properties Programmatically


At the beginning of another lovely day of writing courseware in mad pursuit of unrealistic deadlines, I received a frantic call from a business partner. He was at the end of a long consulting project and had several hundred Microsoft® Word documents, all of which required their document properties to be set identically, except the Title property of the document, which was to be based on the document file name, minus the .

Ken Getz

MSDN Magazine March 2006

XML Comments: Document Your Code in No Time At All with Macros in Visual Studio


Starting in Visual Studio 2005, XML documentation support will become available in Visual Basic and C++ as it has been for C#. However, making full use of the many comment tags will take a little extra work In this article, the author shows how Visual Studio macros can be used to automate the creation of XML documentation and creates macros that write large sections of comments with just a keystroke.

Tony Chow

MSDN Magazine July 2005

SharePoint: Add a Recycle Bin to Windows SharePoint Services for Easy Document Recovery


Windows SharePoint Services helps improve collaboration and workflow while protecting documents and intellectual property. But one feature is conspicuously missing - an easy way to back up and restore deleted files from document libraries. In this article, the authors take advantage of the extensibility of WSS and its server-side and client-side object models to build a restore feature that works like the Recycle Bin in Windows Explorer.

Maxim V. Karpov and Eric Schoonover

MSDN Magazine February 2005

Full text search in a Word document



  I´m currently programming a web search application in ASP.Net and having problem with full text searching. My requirements are:

1. Save a byte array from SQL server to word document as a temp file in a server side?

2. How to highlight the string I am currently searching in the Word document and return to the user the sentence with the highlighted string (like on Bing or any other search engines)? Is it possible to fullfill this requirement with full-text search integrated in SQL Server 2008?

Thanks in advance,




iTextSharp - Multiple Document Concatenation



I have built a routine which takes a byte() array and passes it to iTextSharp for rendering as a PDF.  This is working just fine.

However, in my application, users want to be able to select multiple documents and have the program render them as a single, combined PDF.

For the purpose of this discussion, let's say they chose two documents.  I form the byte() array containing the data of the first document and then, I increase the size of that byte() array and load the second document's data into one.  The result is that I have a single combined byte() array which I now want to render.

However, when the PDF viewer opens (in runtime), it's only showing me the first document (as if there is no more data in the byte() array to render).
My thinking is that perhaps it's picking up the End Of File (EOF) marker and therefore not rendering the data past that point in the byte() array.

Any thoughts on this?  Here's my code.

Prior to the For/Next construct, I have a dataset already containing a list of documentId's from a database that works with my EDM package.
A webservice call returns the byte() array for each document in my dataset into mb() and I use mbbnew() to build the combined byte() array for the documents requested by the user.

Just to be clear,

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