F
F
Flie2014-12-27 21:55:03
Computer networks
Flie, 2014-12-27 21:55:03

How to turn a pdf file into an alpha-character code, or what did I come across?

Hey!
In XML, in place of the pdf file, such a thing is stored:

JVBERi0xLjINMSAwIG9iag08PA0vVHlwZSAvQ2F0YWxvZw0vUGFnZXMgMiAwIFIg
      Pj4NZW5kb2JqDTIgMCBvYmoNPDwNL1R5cGUgL1BhZ2VzDS9LaWRzIFszIDAgUiA3
      IDAgUiBdDS9Db3VudCAyDT4+DWVuZG9iag0zIDAgb2JqDTw8DS9UeXBlIC9QYWdl
      DS9QYXJlbnQgMiAwIFIgDS9NZWRpYUJveCBbIDAgMCA2MTEgODM2XQ0vUmVzb3Vy
      Y2VzIA08PA0vWE9iamVjdCA8PA0vSW0xIDQgMCBSIA0+Pg0vUHJvY1NldCBbIC9Q
      REYgL0ltYWdlQyBdDT4+DS9Db250ZW50cyA1IDAgUg0+Pg1lbmRvYmoNNCAwIG9i
      ag08PA0vVHlwZSAvWE9iamVjdA0vU3VidHlwZSAvSW1hZ2UNL0ZpbHRlciAvRENU
      RGVjb2RlDS9XaWR0aCAxMjczDS9IZWlnaHQgMTc0MQ0vQml0c1BlckNvbXBvbmVu

This is just the beginning, then there is a lot more of the same code for a total of 1.1 MB. Tell me, be kind: what it can be and how it can be turned into a pdf, which it should be!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Ozeransky, 2014-12-27
@Flie

Your piece of information is the header of the PDF file in base64

%PDF-1.2
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R >>
endobj
2 0 obj
<<
/Type /Pages
/Kids [3 0 R 7 0 R ]
/Count 2
>>
endobj
3 0 obj
<<
/Type /Page
/Parent 2 0 R 
/MediaBox [ 0 0 611 836]
/Resources 
<<
/XObject <<
/Im1 4 0 R 
>>
/ProcSet [ /PDF /ImageC ]
>>
/Contents 5 0 R
>>
endobj
4 0 obj
<<
/Type /XObject
/Subtype /Image
/Filter /DCTDecode
/Width 1273
/Height 1741
/BitsPerComponen

You can try to convert it by re-encoding everything from base64 and open the resulting file with already decoded information in a PDF file reader.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question