Relative Links In PDF?

Jun 9, 2010

Have written an ASP.Net application. Part of the application deals with being able to view PDFs. The initial PDF viewed acts as an index to access other PDF documents. You click a link in the Index PDF and it jumps to another PDF file. Legal documents, agreements, etc.

This scenario works on some computers and on others it doesn't. I managed to figure out what the problem was. On some of the computers the initial Index PDF was being hosted within the browser and on some other computers it was actually jumping out of the browser and directly into Adobe Acrobat. As soon as the PDF jumps out of the browser and into Acrobat the relative links in the Index PDF stop working because it is hosted client side via Acrobat but the additional PDFs it is trying to access are on the server.

I figured out why some computers stay in browser and why some jump out. There is an option within Acrobat itself that determines this behavior. It is under Edit--> Preferences ----> Display PDF in Browser.

I am in a jam because I am not in control of the PDF documents themselves and how they are written, and I obviously have no control over the options selected in Acrobat on each and every computer. My problem is also compounded by the fact that our firm has just recently purchased a new PDF reader called Nuance that will be pushed out firm wide soon and I don't think it even has the option to have PDFs hosted in browser.

I can get what I need to work if I create the index in HTML, but the problem is I don't write the Indexes and the people who do are not trained in HTML. I can get the people who write the indexes to change from relative links to absolute links, but then I run into the problem of what if we change where we are hosting the PDF files? All the links will break again? I think we are stuck with relative URLs, but how can I make it work?

I am thinking about maybe hosting the PDFs within Silverlight?

View 2 Replies


Similar Messages:

MVC :: RouteUrl Relative Links Notation?

Feb 3, 2010

to pass existing route values using the RouteUrlExpressionBuilder syntax?

I mean, having a page route, say, 'Countries/Great Britain', how can I get a hyperlink with NavigateUrl="<%$ RouteUrl: RouteName=cities,country=*current*,city=London %>" without using codebehinds?

View 4 Replies

HttpHandlers / Modules :: URL Routing And Relative Links Behavior?

Dec 11, 2010

I'm building a website that stores a number of articles. The URL for each articles implements URL routing in the form /Articles/{categoryid}/{articleslug}.

Some articles have links to a graphics file. The link does not specify the full path so I'm storing the graphics file at /Articles/{categoryid}/{articleslug}/graphic.jpg.

This works fine on my desktop. But when I deployed the site to a shared hosting account, the behavior is different.

Now, the link only works if I store the graphics file at /Articles/{categoryid}/graphic.jpg. In other words, on my desktop, the {articleslug} is assumed to be a directory, but on the web it is assumed to be the name of the current page.

Does anyone know why the behavior changes? You can seen an example at http://www.blackbeltcoder.com/Articles/asp/creating-website-thumbnails-in-asp-net. Both the screenshot and download link near the top are broken links.

View 10 Replies

Mapping Of Relative Path To Absolute Path Of Webpage Links?

Apr 8, 2010

I am Final Year IT Engineering student. I am Doing Content Management System in ASP.net for my college. I have given link on my master page for various pages in the application; where I have specified only relative path of those pages. When I run this project and follow any link it works well for only first time and for second time when I click any link it .net run time environment unable to find the absolute address of that page.

View 2 Replies

How To Get A Relative Path In MVC

Sep 9, 2010

How do you calculate a relative path in ASP.NET MVC?

View 2 Replies

Getting Relative Path In JavaScript?

Jun 21, 2010

I've got this app where I'm using an IHttpHandler to serve JSON data to my JavaScript method.

[code]....

This works fine on my "localhost" webserver, but I've also got a staging server for my clients to use. http://staging.infinitas.ws/ClientSite/

The problem that I'm having is that when the app is hosted on the staging server, the theSource is mapped incorrectly (contains /ClientSite/). I could do something like a String.Replace but I'm looking for a more elegant way of achieving this.

View 1 Replies

Get A FileStream From A Relative Path?

Apr 24, 2010

I am trying to get a FileStream from a relative path. The file is in my project, but when I try to do that it automatically appends C:\ in front of that.

1. Does the FileStream only works if the file is on a local Hard Dive?

2. Also if it works from the local hard drive, then does my application needs some permission to read the file from C Drive?

View 2 Replies

.net - Absolute Vs Relative Path?

Dec 14, 2010

Possible Duplicate: Absolute path & Relative Path

When to use absolute path, relative path and what is the difference between both?

View 2 Replies

Relative Path - Different Project?

Sep 20, 2010

I have three projects inside my solution and i using some same images on all of three projects. How can i create relative path from one project to another?

View 4 Replies

CPU Usage Relative To Number Of Users?

May 1, 2010

My Asp.net application uses 25-30% of the CPU on a test server which has 600 MB Ram on it.

I can see the asp_wb process taking that much percentage of CPU.

This is when I am testing using one user.

How many users can the server afford then without falling over?

Is there a relationship between the CPU Usage and number of user aka if there are 2 users my application will sky rocket to 60% of memory usage?

View 1 Replies

Web Forms :: How To Return A Relative Path

Apr 19, 2010

what it does at the moment is return an absolute path for example h:myfile . however, this is causing me problems because when browsing to the page, it is not returning the file i need because it is looking for a h: drive which the client machine does not have. so i was thinking i need to return a relative path so the not looking straight to the h: drive and rather it is just looking for the filename. i have also created this as a virtual directory on iis which is where is looks for the file location.

View 8 Replies

C# - Calculating Relative Path Change?

Oct 6, 2010

Assuming I have a .css file with the following linebody { background-image: url('../images/bg.png') }My build process does some CSS magic and eventuall move this file from
~/Content/styles/styles.css
To
~/temp/styles.css

This invalidates the url statement in the file and needs re-written to ../Content/images/bg.pngThis is my question - given the original file location, the new file location and the background-image url in the file is there a reusable way calculate a new relative path for the image?In case someone doesn't know css urls should be relative to the css file it is contained within.

View 2 Replies

Calculating Relative Time Offset?

Oct 13, 2010

I was reading this article about relative time calculationThe problem is that the results are wrong due to the time offset. My webpage is Greek.So how should i modify that function to work correctly, including the GMT+2 or GMT+3 hours offset?

View 2 Replies

Load A Pdf File With Relative Path?

Dec 7, 2010

my asp.net program have to open pdf files, these files are contained in a directory named "pdf",

The problem is: The webpage doesn't find the relative directory "/pdf" ; to solve the problem I have to write the exaclty path "C:inetpubwwrootsitepdf" butI want to use only the relative path to avoid other problems.

View 1 Replies

HTML Img - ASP Image And Relative Paths

Mar 4, 2011

What is the correct way to reference an image in ASP.NET for live deployment on IIS? The following works in dev and production:

<asp:ImageButton ID="ibnEdit" runat="server" OnClick="ibnEdit_Click" ImageUrl="~/App_Themes/Default/images/one.png" Visible="false" ToolTip="Edit" />

The following doesn't work in either: (why not?)

<img src="~/App_Themes/Default/images/two.gif" />

The following works in dev but not in production:

<img src="../App_Themes/Default/images/two.gif" />

View 2 Replies

C# - Use A Relative Path In XDocument.Load?

May 6, 2010

I have an XML file named PageData.xml in my App_Data folder. I want to populate an XDocument with this file using XDocument.Load.

If I supply the full physical path it works, i.e.:

XDocument vXDoc = XDocument.Load("/Work/Project/Web/100413 Dev/App_Data/PageData.xml");

...where "Work" is a folder on my C: drive.

If I try a relative path like this, though, I get a DirectoryNotFoundException:

XDocument vXDoc = XDocument.Load("AppData/PageData.xml");

"Could not find a part of the path 'C:Program Files (x86)Common FilesMicrosoft SharedDevServer10.0AppDataPageData.xml'."

This is obviously wrong, but there must be an easy way to set the correct relative path?

View 1 Replies

MVC :: Relative Virtual Path Is Not Allowed Here?

Oct 29, 2010

OK, I've seen a lot of ambiguous errors, but this was is in the top 20 or so. I have a RenderPartial that looks like this:

[Code]....

When the view loads, I get this error:

The relative virtual path '~Areas/User/Views/Shared/ProjectStats.ascx' is not allowed here. That really helps. Why isn't it allowed there? What's wrong with it? Just above it I have other PartialRender calls that work without a problem. They're created exactly the same way. Here's another:

[Code]....

This works fine. I thought maybe it was due to accessing a view from another Area, but I added a partial view to that Area's folder and it still didn't work.

View 3 Replies

MVC :: Get View Relative Path In Code Behind

Jan 22, 2010

i would know if is possible and how i can retrieve the current relative path of the view that is executed. The code is in a model file (C#)

View 2 Replies

Get A Path Relative To The Current Address?

Jan 22, 2010

Suppose I have a resource located in ~/Resources/R1.png This resource's relative URL will vary depending on the current address.

For instance: If I'm at www.foo.com/A/B/C/D.aspx and the www.foo.com/A is the root path including Virtual Directory, then the path relative to the current address of ~/Resources/R1.png is ../../../Resources/R1.png

How can I get this relative path?

EDIT:

I want a web path that I can use in a web page, not a server path.

View 4 Replies

Get The Relative Path In The Class Library?

Sep 7, 2010

I have to access a relative path of the XSD file to validate a XML file. The XML file and the XSD file are part of the class library. How do I access the relative path in the class library?

In case of website, I would use server.mappath(path). Is there anything similar to get the virtual path to the corresponding physical directory on the server in the class library?

View 2 Replies

C# - Relative URL Not Working In System.Web.UI.UserControl?

Feb 4, 2011

public class foo : System.Web.UI.Control
{
public foo()
{
var a = new HyperLink(){ Text="Test", NavigateUrl="~/abc.aspx"};
this.Controls.Add(a);
}
}

The above code works properly, and when added to a page will successfully identify the tilde / ~ symbol and convert the url into a relative url.

However, when I change the derivation of the class to System.Web.UI.WebControl it does absolutely nothing, and leaves the tilde / ~ intact.

I had a look at System.Web.UI.Control which implements the IUrlResolutionService interface, but still can't seem to get System.Web.UI.WebControl to resolve urls.

View 2 Replies

Configuration :: Relative Path For Data Source?

Oct 8, 2010

I am doing SOA architecture and the data base is in service side ie.within the project(website 7)

how can i can mention relative path for the data source ?

OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\sathiyabalu\My Documents\Visual Studio 2005\WebSites\WebSite7\App_Data\alumni_member.mdb");

View 1 Replies

Streamreader For Remote Site And Relative Image Src?

Jul 15, 2010

I am trying to create a small app that will stream read a remote web page (specified by user input)find all images within the page (using regular expressions)stream read these imagesadd them as LinkedResource 's to a HTML emailI have got it working fine when the images and defined using absolute urls but not when they are relative - How can I can webRequest / streamReader to behave like a web browser does and locate the images based on their relative location.I have thought about manipulating the main web url and prefixing it to the source of the image, but I am not sure how I would deal with am image source such as

[Code]....

View 2 Replies

Web Forms :: URL Routing And Relative Referencing With Masterpage

Jan 3, 2011

I am using url routing to route user to his profile page. This profile page is a child page and is at the root directory. The css, javascripts are in css,js sub directories. Now the problem is of referencing in master page. All of the pages of the website runs smoothly except the page reached after url routing. This explains the problem i am having : [url]

I have used ResolveURL and URL.Content but this again shows up error saying me to missing an assembly directive. These are the other ways i tried in the master page:

<link rel="stylesheet" type="text/css" media="all" href="css/stylesheet.css" />
<link rel="stylesheet" type="text/css" media="all" href="/css/stylesheet.css" />
<link rel="stylesheet" type="text/css" media="all" href="../css/stylesheet.css" />
and
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="[Code]....
js/jquery-1.3.2.min.js"[Code]....
"></script>
<script type="text/javascript" src="[Code]....
js/jquery-1.3.2.min.js"[Code]....
"></script>

Or Is there anyway to redirect the user again as the usual site ran before url routing i.e.
on clicking the Home menu now the user is redirected to ...com/user/home.aspx whereas home.aspx is in the root domain. I am using this on the menu: <a id="A1" runat="server" href="~/Home.aspx">Home</a>

View 1 Replies

C# - How To Secure Web Service To Only Allow Relative Path Calling

May 19, 2010

I have ASMX services for my web application that I would only like available to the same application.Is there a way for the web service to only be accessible by the same application, such as relative/absolute path restrictions?

View 3 Replies







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