Print Page | Close Window

pdf is damaged beyond repair

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: Beginners
Forum Description: This is for users new to PDF. Ask simple questions here.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=2133
Printed Date: 23 Apr 2019 at 7:04pm
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


Topic: pdf is damaged beyond repair
Posted By: taral
Subject: pdf is damaged beyond repair
Date Posted: 20 Feb 2017 at 4:23am
Hi All,

I have simply opened a pdf in notepad++ and copied all the content (Ctrl + A , Ctrl + C) and created a new text document and paste it there and then renamed the file extension to *.pdf 
now if i open this new pdf in acrobat it shows pdf is damaged beyond repair. Why did i get this error..??
Anything will be appreciated,..?



Replies:
Posted By: Rob Lyman
Date Posted: 23 Feb 2017 at 8:50pm
PDF is a binary file format: when copying, the bytes it contains must be preserved precisely, and remain at the same locations in the file.

If you open it as plain text in a text editor, several of the binary values it contains will not be displayable in whatever text encoding your editor is trying to use (most likely ASCII or something closely related, such as ISO-8859-1). These un-displayable bytes will be converted to something that can be displayed; after copying-and-pasting, these modified values will irreparably corrupt the data of the PDF. (It's also possible your text editor is doing things like converting line endings, which will further corrupt the data.)

In short, you can't treat the contents of a PDF as plain text; you have to make efforts to preserve its binary nature.


-------------
Rob Lyman
Software Engineer
http://www.datalogics.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net