3

Snapshot of the present notebook I was trying to save my notebook in .pdf format, but instead of that, somehow this happened. How do I restore my notebook? Please Help.

Subhajit
  • 31
  • 2
  • Yes. It did not help. the outcome was the same code – Subhajit Mar 30 '18 at 14:28
  • 2
    It looks like you saved a PostScript (not PDF) version of your prob1.nb as probl1.nb instead of as prob1.ps. If so, the question is whether you are backing up your files (e.g., with automatic backups). – Alan Mar 30 '18 at 16:47
  • 3
    Yes, this isn't a corruption, but it looks like the file was saved as a format that is not .nb. Unfortunately there isn't a way to convert it back that I am aware of. Hope you've got backups. – ktm Mar 30 '18 at 17:10
  • thanks Alan and user6014. This may have happened. Unfortunately, I did not have a backup. – Subhajit Mar 30 '18 at 17:17
  • 2
    Could you open the document in a ps/pdf viewer, and then copy the text? – Carl Woll Mar 30 '18 at 18:22
  • No, because I can't save it in .pdf or .ps format. It just forms a 0 KB file once I try to do that. @Carl – Subhajit Mar 30 '18 at 19:01
  • It's already in .ps format, just open the file in an application that can read postscript files. – Carl Woll Mar 30 '18 at 19:11
  • 1
    what you have somehow ended up with is postscript code in a cell in a notebook. Copy the code and paste into a text editor (notepad). Save. Change extension to ".ps" then open with acrobat and see what you have. Aside, when you originally "saved as" postscript it would have created a copy, still allowing you to save the notebook in native format. (ie you did at least two wrong things to get where you are) – george2079 Mar 30 '18 at 19:28
  • Thanks for your suggestion @george2079 but changing extension of a text file like that only saves it as ".ps.txt" format. I also tried selecting the full doc from the .nb file and saving the selection in .eps format, but it seems to be taking too long to generate the file. – Subhajit Mar 31 '18 at 06:24
  • At present it is in .nb format @CarlWoll – Subhajit Mar 31 '18 at 06:24
  • Evaluate that cell, then run Export["file.ps", %, "String"] to create a ps file that you can open in a ps/pdf viewer. – Carl Woll Mar 31 '18 at 06:47
  • It generates a 1 KB file, which is blank when I open it.@CarlWoll – Subhajit Mar 31 '18 at 09:18
  • i mean change the extension in the os. – george2079 Mar 31 '18 at 12:27

0 Answers0