Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

I can't Print the page or copy the text because it is for some reason encrypted downloading is not an option!

If I copy the following:

She is unapproachable

I get this when pasted in any program/app:

Zdn az ~gfppbfjdf`hn

The online PDF.

Similar questions like, Can't copy text from a pdf file do not fit in the description of my question, and I have been searching for 1 hour now.

Could anyone point me in the right direction?

share|improve this question

marked as duplicate by Karan, KronoS, Brad Patton, Simon, 8088 Apr 26 '13 at 16:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
You will need to decrypt the pdf file in order to copy the contents of the pdf. –  Ramhound Apr 25 '13 at 19:26
    
@Ramhound Not really; see my answer below. –  Aaron Miller Apr 25 '13 at 19:30
    
The thing is, I can't download the file. The PDF is stuck up in the website, not even the browser view. as you can see at the link 'online PDF' –  Mr. Goose Apr 25 '13 at 20:19
    
    
@Karan if you read my question again, it would be more clear for you to understand why it is related and not a duplicate. –  Mr. Goose Apr 25 '13 at 21:00
show 3 more comments

1 Answer

up vote 4 down vote accepted

I don't have a solution for the question you're actually asking, that is, how to copy text and have it come out readable.

However! It looks from your example like the "encryption" here is a simple character substitution. This being the case, it wouldn't be too hard to pass the copied text through a filter to decrypt it and produce a readable result. For example, assume the following script called decrypt.pl:

#!/usr/bin/perl
use strict;

use utf8;
binmode STDIN, ':utf8';

my %map = (
           # from => to
           'z' => 's',
           'd' => 'h',
           'n' => 'e',
           'a' => 'i',
           '~' => 'u',
           'g' => 'n',
           'f' => 'a',
           'p' => 'p',
           '' => 'r',
           'b' => 'o',
           'j' => 'c',
           'd' => 'h',
           '`' => 'b',
           'h' => 'l',
           # other substitutions here
          );

while (my $line = <STDIN>) {
  foreach my $char (split(//, $line)) {
    my $upcase = (lc($char) eq $char ? 0 : 1);
    my $found = $map{lc($char)};
    if (!$found) {
      die "No substitution found for character '$char'\n";
    };
    $found = uc($found) if $upcase;
    print $found;
  };
};

If you copy whatever text you want from the PDF into a file called e.g. source, then execute cat source | perl decrypt.pl > destination, then the file destination will contain the decrypted content:

[user@host tmp]$ echo 'Zdn az ~gfppbfjdf`hn' > source
[user@host tmp]$ cat source | perl decrypt.pl > destination
[user@host tmp]$ cat destination
She is unapproachable
[user@host tmp]$ 
share|improve this answer
    
You've point me in the right direction, I've made a decrypter for it, which worked + viewing the cached version (thanks to the google database) was also a great idea to copy the text. –  Mr. Goose Apr 25 '13 at 21:10
add comment

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