Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 745579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T09:35:58+00:00 2026-05-14T09:35:58+00:00

I receive encoded PDF files regularly. The encoding works like this: the PDFs can

  • 0

I receive encoded PDF files regularly. The encoding works like this:

  • the PDFs can be displayed correctly in Acrobat Reader
  • select all and copy the test via Acrobat Reader
  • and paste in a text editor
  • will show that the content are encoded

so, examples are:

13579 -> 3579;
hello -> jgnnq

it’s basically an offset (maybe swap) of ASCII characters.

The question is how can I find the offset automatically when I have access to only a few samples. I cannot be sure whether the encoding offset is changed. All I know is some text will usually (if not always) show up, e.g. “Name:”, “Summary:”, “Total:”, inside the PDF.

Thank you!

edit: thanks for the feedback. I’d try to break the question into smaller questions:

Part 1: How to detect identical part(s) inside string?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T09:35:59+00:00Added an answer on May 14, 2026 at 9:35 am

    You need to brute-force it.

    If those patterns are simple like +2 character code like in your examples (which is +2 char codes)

    h i j
    e f g
    l m n
    l m n
    o p q
    
    1 2 3
    3 4 5
    5 6 7
    7 8 9
    9 : ;
    

    You could easily implement like this to check against knowns words

    >>> text='jgnnq'
    >>> knowns=['hello', '13579']
    >>>
    >>> for i in range(-5,+5): #check -5 to +5 char code range
    ...     rot=''.join(chr(ord(j)+i) for j in text)
    ...     for x in knowns:
    ...         if x in rot:
    ...             print rot
    ...
    hello
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I receive a binary pdf file, which is base64Binary encoded. How can I convert
Following a protocol document, I can receive an array of parameters encoded as an
I receive some xml-files with embedded base64-encoded images, that I need to decode and
I'm dealing with some problems in a few files about the encoding. We receive
I receive this error when I click on the section of my Tab-Bar application
I receive a dictionary as input, and would like to to return a dictionary
We receive lots of data as flat files: delimitted or just fixed length records.
I receive TypeError: Can't convert 'float' object to str implicitly while using Gambler.pot +=
We want all of our AJAX calls in our web app to receive JSON-encoded
I receive an XML file with encoding ISO-8859-1 (Latin-1) Within the file (among other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.