My boyfriend's brother committed suicide last weekend, and left behind a will... in the form of a damaged PDF. I've tried to repair it using the various online services, to no avail. Looking at the source code of the PDF, it's clear something very strange is going on. There are huge blocks of "ÿ" character repeating, and then bits of HTML, including a partial "mergeOptions()" JavaScript function, which looks like something one uses for autocomplete. How could this happen? The PDF ought to contain only a scan of the handwritten will. I understand PDF files can become corrupted during transfer from one device to another, but how could an HTML page have gotten mixed up into the source code? Also, it looks like a page which my boyfriend's brother might have consulted, as it's related to his job, but not something he would have included in his will.
It seems like repairing the file is a lost cause (have tried Foxit, Xpdf, GhostScript, and some other stuff), but is there no way to recover anything from it? In between the gibberish are blocks of code which resembles PDF code. But even when I remove the gibberish and add PDF headers to the source code, the PDF appears as a blank page.
Also, is there any explanation for what could have happened to this file? It's just baffling. The file was on a hard drive, so at first we thought it could have been corrupted during transfer from the laptop to the hard drive. But we've now recovered the file from the laptop as well and it is exactly the same.
Any help/advice would be greatly appreciated, thanks!!
Editing to add a sample of what the file contains:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿelse {
return false;
}
};
}
if (options.categories !== undefined && options.categories instanceof Array) {
var categories = [];
enter code here
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿU¢¢JGƒ€èZ m[R}h‹—Ø$îõø»Ýïuâ;>ïØÂÍ šŒé¿‡÷£6ëÅÕ~ 4;²Õ •j,Mîîî¼i_Uš Ö÷¿“È#æU¼A·ñ€ŠïØi™[/±P‡¸cßé]_{×̵æ %»Ù¹²” C>{üŸ6¹0CWá½€!ÿÿÿò—Š‹D ä>•wœn\ L’ê+ÙDD{99DqBúž²">H¾»lÌ/ÏéÝw×9\UÅ?Øý ÍÕ[nò•b«Ú6'±ºþbÛ6ÞA±| Z0% ðô,à¤MûèÓ86/™¸Ù$\É|n‘8çcZ
áá Ó^½9šæ
4œA8®Âö¸.ÙÒ;lk8œ»
vú~þÿ{¾Äéôø¿ŽþÏZÑüv‹ù1Þý;uõüWÑxVÎßó(ŸÎ÷åµméÖΟ hN½Ç>‚Îf“™¯…7Ü?÷ÿÓÿp>çþŸoíûÿÿÿà ¼è€í:!”õăb@Ùhr@(¥áíËÌó@Æm•¨®6®ÛÔØ[³¹‰(ײ»®äM1ÈÖßþ÷—Ô,¬7…^½T &Ðh?JáG¢=ìÒk8ƒìY I¡Ì¹°è°»?*s´ëœüTYÒ‹Aß'arO(ÌëÁ˜/HÉ;ˆ³çI80}ÎÐx6Ãç~üeÿ»'Qïµ]ø'«ü÷ﱺ '.îÞ¯õ ÿ +ùû¹ééÏÑ÷ß }wû¾BëxºŠþêúú.ûÕÞ¬ïÿyêã¼ïžªï½Wî^¬;ÏWÕûÿWï»ÓÕÃîù꾯ßw ð>qÀ UAš 3Æa)B®¾¿ÿóÙ&ÅžO_ÿõ/þ&‹ßd$ÙZÐŒ}Õ§Õj÷ר)Ö’š„Îô«Y. ®¼²ÞYR¿o–aDj.k1g¬üÛÆ‚o¿‘5¡OúÅú÷àœµN¤ñ8¿šÓÒ”^7ùÄÔöf£_˜bJëUŸ¬¥nÚþN›u¥†ÿ—+ÿÉB_©¼¨& ùÝõ“ä‚NïÛòAml·¿V‰P„/²Fm?Ýô½V/QŸw{ösì×ÙÕú4Óo‹ts„Ì,ÜŠ5õ?Ó4ë°ˆz™:ź~ËÝ¡='–«ðÇAFì}{æ¯âü®²ü°ß{_a;ß»òÍwß—¶è¿áF †6ÒéAÔÔÛ¦ZZºº©HWY;¯`LA/Z%¼ƒEFhzm˜Bôû÷7‹ÿA#Yá±2ÕË5K-uJÇnõ'Tõß(´$T:{á³Ü¾6fI¤Ó¾—©$Ïýœÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
The JavaScript is just there that one time. After that there are alternating blocks of the ÿ character and the kind of code shown above. The file starts and ends with the ÿ blocks. I shortened them in this snippet - they're actually much longer.
I don't know if this is the right way to share the file but here it is:
https://1drv.ms/b/s!AnGtFF6JZrtsgWSEYq_UiU7ib0rQ?e=xJpgFg
Thank you guys so much for all your help already, I'm honestly so moved. A violent death is a horrible thing.

fileutility (see here ) – Berend May 30 '23 at 08:01So first of all, I used TrID to check the file type, and it wasn't recognised as a PDF, which makes sense as the PDF does NOT start with %PDF-1 nor is there any %%EOF anywhere in the file. There is a "ÝÝ*£~PDF6Ók·×ä" close to the start of the file.
I got nothing from GhostScript. Acrobat says the file is damaged and can't be read.
I can share the file, not sure if this is the right way to do it:
https://1drv.ms/b/s!AnGtFF6JZrtsgWSEYq_UiU7ib0rQ?e=xJpgFg
– pennylane May 31 '23 at 06:58