Hi yHaider,
you can't see the folder /usr/bin because /usr is an invisible folder. I guess Apple made it invisible so you don't accidentally get in there and change stuff without knowing what you are doing.
Here is an optional step to make this folder visible. But just to make it very clear, this step is not necessary (terminal doesn't care about folders being invisible) and the folder is invisible for your own good.
If you want to make this folder visible anyway, type in the terminal:
sudo chflags nohidden /usr
after hitting enter, you will have to enter your password. And now you can see the folder in finder.
As to how you should save it:
Just follow the steps by paddytheprogrammer (also below), it includes saving the text in steps 1)-6) (nano is a text editor).
Here are some quotes so you don't have to look all over the thread:
Here is the code which you need to copy and paste in step 4).
paddytheprogrammer wrote:
#!/usr/bin/python
import re
import sys
if len(sys.argv) != 2:
print 'Wrong argument count'
exit(1)
infilename = sys.argv[1]
outfilename = infilename + ".fixed.pdf"
fpIn = open(infilename)
fpOut = open(outfilename, "w+")
line = fpIn.readline()
while line:
if re.search("^\<\< /Type /Annot", line):
line += fpIn.readline()
pos = line.find("endobj")
while pos == -1:
line += fpIn.readline()
pos = line.find("endobj")
if re.search("\/Highlight", line):
line = re.sub('/C \[.+\n?.+\n?\]', '/C [ 0.8396019 0.9160907\n0.5048240 ]', line)
fpOut.write(line)
line = fpIn.readline();
print "Done"
And here is the step by step instruction again (carefull in step 5), it actually says "ctrl" and not "cmd" - I overread this the first time):
In step 3), the text editing programm will open in terminal, don't expect a new window to open.
So for step 4) you have to paste the code from above into the terminal.
paddytheprogrammer wrote:
(for all commands just type the bits between the quotes, don't include the quotes):
1. Open up terminal
2. Enter command "sudo nano"
3. Enter your login password. Nano, the text editing program should open
4. Copy the text above and paste it in
5. Press ctrl+x
6. Press Y
7. Type "/usr/bin/FixHighlights" and press enter
8. Enter the command "sudo chmod +x /usr/bin/FixHighlights"
9. Now enter the command "FixHighlights", you should get the response "Wrong argument count"
10. Now you're ready to go, you just need to enter "FixHighlights" followed by a space and the name of the file you want to fix. This will be something like:
"FixHighlights Documents/yourfile.pdf"
If anything is unclear, just ask. I think I'll be on my computer for a while.