Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I use Preview's Command-F (find) to search for C# in the pdf document. However, the result is not for 'C#', but just 'C': I get hundreds of meaningless search results.

How can I get the search result exactly for 'C#' or 'C++' in Preview?

share|improve this question
    
This doesn't work for me either. Searching for a command like ignore= will return results like 'IgnoreInterfaceRegex' and commands like ignore:. Quoting doesn't make a difference. As an alternative to Preview, try Adobe Reader which works fine. –  Stefan Lasiewski Sep 28 '11 at 23:54

3 Answers 3

up vote 4 down vote accepted

I've not found a way to get Preview to search for characters like # or +, but Skim, an alternative PDF viewer (homepage here), is a good replacement/addition to Preview and is able to search more specifically.

I've tested it and found it was able to find C++ (without needing any quotes/special options) without bringing up all C results.

It was also able to search specifically for accented characters (like é or ö) — though requires such characters to be accented in the search to find them (i.e. you can't search for blah and expect it to match bläh, nor vice versa). In Preview, either search will return matches for both accented and unaccented characters.

share|improve this answer

Enclose the search string in double quotes, as such: "C++". This will filter the search results from the search for "C" so select Relevance as your sorting criterion from the gray toolbar that appears. All the pages with occurrences of "C++" will then be presented first.

share|improve this answer
2  
The quotes allow you to search for whole words, but the ++ in the search is still entirely ignored. As far as I can tell, the search function in PDFkit will ignore a lot of characters (like '+') and treat accented characters like their non-accented versions (é as e) when searching. This makes it easier for basic searching but harder to find an exact string. –  drfrogsplat Nov 12 '10 at 4:15
    
Actually this might just be a limitation of Preview rather than PDFkit... –  drfrogsplat Nov 12 '10 at 4:22

Use Google Chrome's built-in pdf renderer. Enter the file:///path/to/file.pdf URL of the file, or bring up the file browser by entering a know directory, like file:///Users/home and navigate to the file location.

share|improve this answer
    
Safari doesn't seem to ignore special characters either. And you can also just drag the files on the browsers. –  ؘؘؘؘ Nov 28 '12 at 10:57
    
Yes, DnD seems to work just fine, thanks for pointing that out. –  haridsv Nov 29 '12 at 9:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.