Question: I like to have a space after function names, arrays, that sort of thing, so a function declaration would look like:

```
function myfunction ($param)
{
    $a = array ('a', 'b');
    callfunction ($a);
}

```

And although I have set the style guide in Netbeans to correspond to this whenever it does autocomplete/suggestions it always misses out the space and gives me something like `callfunction($a)` even though when I go source->format (alt+shift+f) it then formats the code properly.

Any way to get autocomplete to add the space?

**UPDATE:**

Just to make things clear, I have set up Netbeans to correspond to my coding preferences, as indicated by the ability to use auto format. The problem is auto complete (or whatever the hint thing is called) does not respect these settings, leading to the missing space.

Answer: 
I would do it this way:

Controller:

```
    [Authorize]
    public ActionResult GetPdf(string name)
    {
        var path = Server.MapPath("~/Content/Private/" + name);
        bool exists = System.IO.File.Exists(path);
        if (exists)
        {
            return File(path, "application/pdf");
        }
        else
        {
            // If file not found redirect to inform user for example
            return RedirectToAction("FileNotFound");
        }
    }

```

web.config:

```
  <location path="Content/Private" allowOverride="false">
    <system.web>
      <authorization>
        <deny users="*"/>
      </authorization>
    </system.web>
  </location>

```

robots.txt (place it on the root of Your site):

```
User-agent: *
Disallow: /Content/Private/

```

This way your folder will be hidden from crawlers and protected from unauthenticated users.
In this case I was using Forms Authentication so I was automatically redirected to login page if I was trying to access file before logging in. ( `http://localhost:8080/Home/GetPdf?name=test.pdf` ) In Your case it might be different.

References:

[Robots.txt](http://www.robotstxt.org/robotstxt.html)

[web.config location element](http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx)
You have to return the pdf file as a FileResult. See this post for more information

[ASP.NET MVC - How do I code for PDF downloads?](https://stackoverflow.com/questions/730699/asp-net-mvc-how-do-i-code-for-pdf-downloads)

In your case the action will looks like

```
public ActionResult OpenContentResources()
{
    return File("~/Content/PDF/ABC.pdf", "application/pdf");
}

```