Edit external links location in PDF and save the file - ruby-on-rails

I just want to open a pdf file, replace the external links target than save the file.
The links text or image remains unchanged, just the location.
I've been looking at pdftk, combine_pdf but I couldn't figure it out how to do it or if it's even possible.
Can anyone point me to the right direction?
I prefer open-source solutions.
Thanks

Related

Editing Visio Shape Excel OLE Links

I have a Visio doc that has ~200 links to a collection of Excel spreadsheets. I have the spreadsheets but the Visio links point to a path that is inaccessible. I would like to change these. Using Visio Plan 2.
By a lot of experimenting the only way I could find was to open the doc, tell Visio to update the links, then when it failed go through the links in the convert dialog that appeared.
This dialog isn't very helpful as the file path is all jammed into a small text box with no resizing controls. Fortunately, I could see the end of the filename and that was sufficient for me to determine which file was for each link.
I had to edit each one of these entries individually as one can't group select and edit in this dialog.
Pain that it was, I did get the links hardcoded to another location, so at least that aspect works.
However, I need to have these as a relative location so that the vsd and xls files can travel together and any other user can open the vsd no matter the location, just so the vsd and xls are in the same folder.
I can't find a way to do this. I tried prepending the file name with '..\filename', Visio complained but I went through and edited all of them, saved, but it failed to find them when I re-opened the document.
How can I make a relative path in these? Is there an easier way to edit the links?
Thanks.
Call "Links" window via pane "Tell me what you want to do"

Code that can look at open browser tabs and store the urls?

I am attempting to write a program that looks at the current browser you have open, goes through each tab, and copies and pastes each page's url into a notepad file.
I have no issue with writing the file; my main concern is that I can't find anything in any language that can look at the browser, sift through the tabs, and scrape the url.
Does anyone know if this would be possible, any code that might be able to help (in any language), or if something like this exists? I would appreciate anyone pointing me in the right direction.
The software I was looking for did not exist, so I created it. It's a chrome extension called Raincheck

building a document preview webpage

Hi i'm wanting to create a webpage in which i can pass a url to a document and it previews it. the idea behind this is so i can create a responsive web view for android so i can preview documents from with an app i have basic knowledge of php and html but if some one could point me in the right direction? i have had a look around but can't find anything that basic i don't need to edit the documents just view them. Does anyone know how to do this?
ps: the docs i want to preview are .xl .xls .doc .docx .pdf .ppt etc
Here is what looks to be a decent open source option.
http://flexpaper.devaldi.com/
One option would be to convert the documents to .pdf first using OpenOffice and then preview them using pdf.js

How to show only the link of an uploaded file, not its location

I have used paperclip to allow me to upload files to a rails application. Everything works and the file is uploaded, but instead of seeing a link to the actual file itself I see the location of it within the systems folder of the rails project.
I'm guessing its either a routing issue or I need to create a link to the file in question. However, I would like to hide the location of the file itself, and only see the link displayed.
I would be very grateful if someone could point me in the right direction here.
You want to hide the actual path of the file in the server, right?
You can achieve that using send_file (http://api.rubyonrails.org/classes/ActionController/DataStreaming.html#method-i-send_file) in a normal controller.
You will still need to do something to protect the download using the real path.

Custom icons in sharepoint 2007 document library view

I need to change the folder icon in a sharpoint document library view.
The catch is, the folder icon is dependent upon various folder properties. So, I need a specific icon for specific folders (I just don't want to change the folder icon across the board).
My initial thoughts were, that if I could find the page (xml or aspx) that sharepoint uses to generate the img tag, I would modify the source to be something like:
src="/GetFolderIcon.aspx?fn={FolderNameHere}"
Where {FolderNameHere} is the actual folder name. Then, in GetFolderIcon.aspx, I would look up the various folder properties, and determine which .gif or .jpeg I needed to send back to the browser.
The problem is, I don't know where that page is located, or what it's even called.
I don't know if that's the correct approach or not, but that's my current thoughts.
Any suggestions on how to do this?
Thanks!
here is a tutoral on something very similar.
http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/

Resources