Add link to PDF within a PDF file using relative addressing - pdf

I want to add a link to some text within a PDF that will bring up another PDF that is located in the same folder. I wish to use relative addressing so that the PDF suite is transportable to other users and computers. I wish this to work on Linux and Macs.
LibreOffice Draw, despite promises, writes out the link address as a full path. Thus if taken to another computer with another user the link fails to work.
I tried manually editing the PDF files using vi and altered the link syntax so;
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[940.9 480.3 1200.7 507.9]/A<</Type/Action/S/URI/URI(Content/Information.pdf)>>
where the target file, "Information.pdf" is in a subdirectory "Contents".
On Linux using Document Viewer, it works! On an Apple, Preview (a PDF viewer) interprets the target file needs to be opened by some application. Adobe Reader doesn't like this syntax either. I tried prefixing the filename with the keyword "file:" which works for a full path but not with relative addressing.
Does anyone know what syntax might work for me

Editing a PDF you can select text and add a hyperlink using LibreOffice Draw. It is then possible to edit the PDF file with a text editor such as vi.
To find the line with the link search for the filename of the target. One problem is that LibreOffice insists in using a fully qualified domain name to locate the file and this won't work after the file is moved, say to another computer. The unedited line should be similar to;
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[940.9 480.3 1200.7 507.9]/A<</Type/Action/S/URI/URI(File:<fullpathname>/Content/Information.pdf)>>
Where Content/Information.pdf is the link target in the same directory as the linking pdf. This line should be changed to
<</Type/Annot/Subtype/Link/Border[0 0 0]/Rect[940.9 480.3 1200.7 507.9]/A<</Type/Action/S /Launch/F(Content/Information.pdf)>>
This works on Unix and MacOs

Related

Excel on Mac. Cannot open IQY file in Data/Get External Data/Run Web Query

I am running Excel version 16.45 on Mac.
I have created a .iqy and saved it in the Queries directory alongside certain templates which were already there.
I go to Data/Get External Data/Run Web Queries. While the templates are accessible, my file is visible but greyed out (same thing happens if I save the file in a different directory).
Would anyone be able to help?
According to your information, I would like to confirm whether the issue occurs when you follow the steps as below:
1.Create a Word file, paste the web URL.
2.Save the Word as .iqy with .txt format.
3.Choose MS-DOS as coding.
4.Create an Excel file and click "Data >Get External Data >Run Web Query (Or Run Saved Query) " of the Bar
I was able to address the issue as follows.
When navigating to the relevant directory with Finder, the '.iqy' file appears to be appropriately named (as per Image 1).
In fact, if you reach the file in Terminal, the file is saved as '.iqy.txt'.
So all I had to do is rename the file, simply removing the '.txt' string at the end.
Screen you see when navigating in Finder

Edit source code of Impress odp file

I want to edit the source code of an Impress file (.odp) but when I open it is just machine coded.
I want to do it because when I converted files from PowerPoint to an Impress File some parts got mixed up. Like for example footer and numbering can't be changed globally. So by editing the source code, I hope to be able to use find/replace in a Text Editor.
LibreOffice formats are zipped archives primarily containing XML files. So unzip the .odp and then edit content.xml.
When finished, zip it back up, making sure to zip it from the correct directory (the one that contains content.xml).
Documentation: https://help.libreoffice.org/Common/XML_File_Formats#XML_file_structure.
If you are using a Mac do the following:
Change the .odp extension to .zip by manually clicking the icon and renaming the file
Unzip the file using something other than the standard Archiver (I used Keka)
You will see the folder of contents including the content.xml which you can easily edit now
Crucial: Go into the directory with your separate files, select all the files then hit 'compress' from the options menu when you right click
Next, rename the .zip to .odp and the file will open successfully
I found that if you don't do option 4 above exactly then the file is slightly different and won't open due to a corruption message.

Obtain the "absolute path to the workbook" from an .xls file

When I use the Excel "Document Inspector" on a particular .xls file to check for "hidden properties or personal information" it says:
The following document information was found:
* Absolute path to the workbook
How can I obtain the absolute path of the workbook from the file? If it needs to be done programmatically, I could use Java (e.g. Apache POI) or VBA.
I know where the file is currently saved, but what I want to extract is the absolute path to the workbook which is saved in the file I have. This is so I can know where it was saved by the author.
Here's what has happened to the file:
Someone authored it, saving it at some absolute filepath unknown to me
They uploaded it to a website
I downloaded it from the website
Excel indicates that the document contains the absolute path from step 1. I'm after this path, not the place I saved it at step 3 since I know that.
I can reproduced that warning message by simply creating an empty Excel file, added a formula, saved it as BIFF8 (.xls). The Document Inspector will then warn about the absolute path. ... but in my case, there was no filename inside the file.
A simple way to verify this, is to open the file in a hex-editor and search for a well-known save location (i.e. the location where a dummy/test file was stored) - this is either stored as ASCII or as 16-bit string, i.e. every odd byte is a character.
If you want to use the POI developer tools, you can use the following:
To list all Excel records:
java -cp poi-3.16-beta1.jar org.apache.poi.hssf.dev.BiffViewer file.xls
To list the document and summary properties:
java -cp poi-3.16-beta1.jar org.apache.poi.hpsf.extractor.HPSFPropertiesExtractor file.xls
To list any embedded objects beside the usual suspects SummaryInformation, DocumentSummaryInformation and Workbook:
java -cp poi-3.16-beta1.jar org.apache.poi.poifs.dev.POIFSLister file.xls
So after running the tools and recording the output, you can then remove the properties via the Excel Document Inspector and execute the tools again. The output can be diffed and you might find the culprit.
Assuming it is an .xlsx file rather than an older-style .xls file, you can
Rename the workbook as a .zip file
Look at the xl\workbook.xml "file" within the .zip file
and you will find the absolute path when last saved from Excel.
This is why it is not a good idea to share work-related spreadsheets with other people, unless you first clear out this sort of information.
I'm not sure how to find it in the binary format files.

flexdashboard and shiny pdf report

I'm new on shiny and flexdashboard.With flexdashboard I've written a .Rmd file to make a nice shiny application (I'm just a statistician).
I want to export some calculations (by a download button)in a report with a pdf file. In shiny examples, I need again to create another Rmd file, as an example of report.Rmd. I can open my application in the browser, and i'm successful to download a pdf file. But it's not working online (with shinyapps.io). I have two files with .rmd extension, and another one with .r extensions(my functions). Can it be the problem of the two.rmd?Do you Have any idea or example working?
thanks a lot in advance
It may be that the server is expecting the function files (*.R) in a certain folder and you are uploading it to another (or in the base folder).
I believe the convention is to put source files into a sub-folder called "R": /R/
If that doesn't work then try \www\. This is where icons are normally sourced from.

Why does my PDF ask for a password after being retrieved from Visual SourceSafe?

PREFACE: Yes we're moving away from VSS in the next few months.
One of my web projects contains, as one of its files, a PDF. The PDF on our QA site is being pulled from VSS.
A QA tester recently told me he's being prompted for a password when he tries to open it. VSS says the file I have on disk is different than the one it has, so I updated it, but afterwards it's still being shown as different.
So basically VSS is mangling my PDF and the results are so wobbly that Adobe Acrobat Reader is confused and thinks it has a password.
I've tried adding it as Auto-Detect and as Binary. Same results.
Why does my PDF ask for a password after being retrieved from Visual SourceSafe and how can I prevent it?
Do you have the SourceSafe 2005 Update installed?
Handy list of known issues: http://blogs.msdn.com/richardb/archive/2007/06/06/list-of-bugs-fixed-in-sourcesafe-2005-gdr.aspx
The PDF bug was one of the most commonly requested hotfixes: http://support.microsoft.com/kb/925234
I've tried adding it as Auto-Detect and as Binary. Same results.
To be clear, are you adding a version of the file you know is not already corrupted? Even so, there are plenty of other bug fixes on the list above which can cause random file corruption -- try that first.
You can remove PDF password by this tool:
Advanced PDF Password Remover 5.0
Step 1: Import PDF files
Click the "Add File(s)" button, browse your computer to find the PDF files and load them.You can import as many as 200 PDF files into this program for every batch processing.The imported files are listed in the file list window as below.
Step 2: Set output folder
You can customize a folder to save the output files all together. The default folder is My Documents\Advanced PDF Password Removerr. Click "Brows" button to specify a folder on your computer, or you can make a new folder manually in the text box.
Step 3: Remove restrictions
Click "Start" button, and the files are processed one by one.
"SUCCEED" is displayed in the Result column after the removing process is finished.