Make a hyperlink to a ClearCase file? - clearcase

In ClearCase, is there anyway to make a straight hyperlink to file? Like of the form
http://mysite/myfile
where all a user has to do is click on the link to view a page or download a file?
We have several non-technical people at our organization who want to look at some of the documentation that developers are storing on ClearCase.

On Windows, you can try and version (add to source control) an xxx.lnk file: a shortcut file, which is set to open an http url.
Once loaded in a snapshot view (or even accessed in a dynamic view), a simple click should open a browser.
An even simpler solution would be to store an xxx.html static page, which would:
open the same browser when double-clicked
list all the actual documentation urls you want.
One file, multiple links!

Related

How to open a generated file on Vaadin Flow?

On my app I want to open a generated PDF with PdfBox on a new tab, I have seen a couple of documentations but they are for old version of Vaadin or won't work in my case. I don't want to save it on the server or attach the file to any link or button, I want to write a method to automatically open it on a new tab.
PdfBox gives an option to save the file on an OutputStream, is there any way to open that OutputStream file on a new tab? Or at least download it without attaching it to an Anchor widget like Flow Viritin does?
The problem lies in the fact that because you don't want to save the file on the server, you cannot then have a direct url of said file to link to. You also cannot pass the pdf file as parameter to another View.
The solution is to store the pdf in the VaadinSession (as byte[] is probably easiest), and when the user then opens another tab by clicking a certain anchor/routerlink, that view will read the pdf from the VaadinSession and add the it to the view. (How to display pdf with Vaadin 14). Please remember to remove the pdf again from the VaadinSession :)

Access Specific PDF Page in WPF WebBrowser Control

I have a webbrowser control in my application that is used to display pdf files that have been created in iTextSharp and are stored locally on the hard drive.
I would like to be able to navigate the file (next, previous, first, last, toc) from my application rather than using the inbuilt nav of the reader in the browser.
I have seen that you can navigate to specific pages by using
Browser.Navigate("filename.pdf#page=?);
This works the first time but when trying to navigate to a different page, it makes the browser disappear completely with no errors. However, I can reload the file without problem if I don't have the #page=? suffix on the file url though. Any ideas on this?
Alternatively, is there anyway in iTextSharp of adding something to the file to allow for it to be navigated from an external command?
All the official parameters that can be used to navigate through a PDF using parameters in the query string after the ? character are listed in a document published by Adobe: Parameters for Opening PDF Files
You already mentioned the page parameter. Another option could be using named destinations: nameddest=destination. In this case, you need to add the anchor with name destination to the file using iTextSharp.
Note that not all viewers implement these parameters. Adobe supports them in Adobe Reader and in the Adobe Reader plug-in, but there is no guarantee that they will work in pdf.js (Firefox), Pdfium (Google Chrome),... If your browser disappears when using an open parameter, you may have hit a bug in the browser or the viewer plug-in that causes the browser to crash. iTextSharp nor iText can crash a browser ;-)
There are no other ways you can navigate a PDF from an external application. The only thing you can do, is to add JavaScript to the PDF so that it always opens at the same page. This is done using an open action. I don't think this solves your problem as it would mean that you have to change the PDF file every time you want it to open at a different page.

download file which redirects?

I've tried to search for this both on Google and StackOverFlow, but simply can't find what I'm looking for, it might be that it's simply not possible, but thought I would ask anyway.
I'm looking for a way to make a file redirect the user to another page, the user would download the file by clicking on a button.
It's for a Prestashop downloadable product, I'm trying to redirect the user to another part of our site (which isn't directly visible) to be able to view magazines, etc. in a viewer.
Now Prestashop is natively set up to download the file, which is what we don't want, hence the use of the viewer, but there is no way to simply provide a link to send the user to instead of a physical file, like a PDF or something. I can't really modify the button as its generated by Prestashop, and if I add a PDF file with the link in there it defeats te purpose as I dont want people having the link in a document (I know they can find it from their history and so on). Hence I thought it would be easier to do it with a document that redirects if possible.
So in short, is it possible to make a file that would send people to a certain web page once they open/download this file on/to their computer?
And if yes, how would one go about it?
Can you make the user download an HTML file? If so, you can use "meta refresh" to redirect the user to your private page.
This does mean the unprotected link will be visible in downloaded HTML file - perhaps you can obfuscate this with JavaScript to make it a little more difficult for users to find your protected URL.
http://www.w3.org/TR/WCAG20-TECHS/H76

Hiding viewable files in sharepoint

Our company have some data in excels/images files that we want to make available to our employee through our sharepoint portal. However we do not want them to be able to download the files or copy/paste them to their PCs.
For this problem, I have written a silverlight app to display excel file and disable select/copy function. So now we upload the files to a document library, make this library 'viewable' to all users. We have a webpart that access the library and pass the links in encrypted form to the silverlight app to display. From the webpart page, the user can not see the links to the actually files. We will give the users link to this webpart page but not the document library itself.
However if a user goes to the 'All site contents' page, he can still easily see the document library and hence download the files.
My question is : is there a way to have the files viewable without letting the user having the link to download it ?
If there are any better ways, I would like to know as well.
Many thanks
A relatively simple way to hide the library from the "All site contents page" is by making it hidden. You can't do this from the UI, but you can either change the list instance (if you build the list definition and instance yourself) to have the list created as hidden, or you can open the list / library with SharePoint Designer and check "Hide from browsers" in the settings of the list.
Alternatively you can mark the list as hidden using the SharePoint Management Shell:
$w = get-spweb http://yoursite
$l = $w.Lists["yourlistname"]
$l.Hidden = $true
$l.Update()
Notice though that making a library hidden doesn't prevent users from browsing to it if they know the URL of the library. Through a developer proxy/network sniffer (like Fiddler), even if using Silverlight, one could figure out the url of the library if one really want to. Even if the links are passed to the Silverlight app encrypted, the Silverlight app itself will likely have to access the full urls, and as such they are trackable.

Silverlight and XtraReports - opening generated PDF report in new tab in browser

I'm trying to send a PDF file from a WCF to silverlight client. PDF is generated by DevExpress XtraReports (in method XtraReport CreateReport(string reportTypeName, RootGenericReportParameterContainer reportInformation)).
Acually PDF is saved somewhere on clients computer after choosing save path in file save dialog - DevExpress takes care of everything - but I don't have a clue how to open the PDF in new tab in browser.
And here is another problem. Silverlight 4 has no access to local file system right? So information about local PDF location is useless. Maybe it would be better to save the PDF in WCF and send a link to it to the client - but how?
I would first question why you need to send the file to the Silverlight client. Get rid of that requirement and the solution becomes much simpler. Silverlight can provide a link that opens a new browser tab. That link would be handled by the web domain, processing it as an HttpHandler, generating the PDF file for the browser. Your PDF url doesn't have to reference a physical file, you can still generate it on request, handle querystring values, etc... Lots of different ways to do this.
Seems that the question isn't really about DevExpress or Silverlight - you're just looking to open a [document of some kind] in a new tab. Each browser natively handles things differently, and users can change tab handling to whatever they want. And (as you mentioned) once the user has downloaded the file, you no longer control it.
Your best bet (and the way I do it) is probably to have a link pointing to a handler/file using "target='_blank' " in the anchor tag on the webpage. From the server side, you would want to set the "Content-Disposition" header to "Inline" to indicate to the browser that the document should be displayed in place instead of downloaded ("Attachment").

Resources