==================================================================================== # # this file has been created for the Lame patcher program available for both *nix # and Windows platforms. # You need this program for continuing the patching of your files: # # http://aluigi.org/mytoolz.htm#lpatch # # Quick step-by-step for Windows: # - launch lpatch.exe # - select this pdftotext_nodrm.lpatch file # - read the message windows and click yes # - select the file pdftotext.exe to patch # - read the message windows to know if everything has been patched correctly TITLE XPDF pdftotext/pdftops/pdfimages allow copying of text (Win32) 0.1.3 by Luigi Auriemma e-mail: aluigi@autistici.org web: aluigi.org INTRO this patch allows to use the Windows version of pdftotext, pdftops and pdfimages (http://www.foolabs.com/xpdf/) on DRM protected PDF files without modifying and recompiling the program. Tested with versions: 4.00, 3.04 and 3.03 FILE pdftotext.exe;pdftops.exe;pdfimages.exe;pdftohtml.exe # 3.04 / 4.00 BYTES_ORIGINAL 6A 00 ; push 00000000 E8 ?? ?? ?? ?? ; call ???????? 85 c0 ; test eax eax 75 ?? ; jne 00448B25 68 ?? ?? ?? 00 ; push "Copying of text from this document is not allowed." / "Printing this document is not allowed." 6A FF ; push FFFFFFFF 6A FF ; push FFFFFFFF 6A 05 ; push 5 E8 ?? ?? ?? ?? ; call 00409A80 BYTES_PATCH ?? ?? ?? ?? ?? ?? ?? ?? ?? eb BYTES_ORIGINAL 6A 00 ; push 0 E8 ?? ?? ?? ?? ; call sub_45BC10 85 C0 ; test eax, eax 75 ?? ; jnz short loc_45F84D 68 ?? ?? ?? 00 ; push offset aCopyingOfImage ; "Copying of images from this document is"... 53 ; push ebx ; int 53 ; push ebx ; int 6A 05 ; push 5 ; int E8 ?? ?? ?? ?? ; call sub_412300 BYTES_PATCH ?? ?? ?? ?? ?? ?? ?? ?? ?? eb BYTES_ORIGINAL F6 ?? ?? ?? ; TEST BYTE PTR DS:[EAX+4C],10 75 ?? ; JNZ SHORT pdftotex.0045D2B1 83 CB FF ; OR EBX,FFFFFFFF 8D ?? ?? ; LEA EDI,DWORD PTR DS:[EBX+6] 68 ?? ?? ?? 00 ; PUSH "Copying of text from this document is not allowed." E8 ?? ?? ?? FF ; CALL pdftotex.0040E1B0 BYTES_PATCH ?? ?? ?? ?? eb # 64bit? BYTES_ORIGINAL 33 d2 49 8b ?? 24 30 e8 ?? ?? ?? ?? 85 c0 75 ?? 4c 8d 05 ?? ?? ?? ?? 48 83 ca ff 8d 48 05 e8 ?? ?? ?? ?? BYTES_PATCH ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? eb BYTES_ORIGINAL 33 d2 48 8b ?? 30 e8 ?? ?? ?? ?? 85 c0 75 ?? 4c 8d 05 ?? ?? ?? ?? 48 83 ca ff 8d 48 05 e8 ?? ?? ?? ?? BYTES_PATCH ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? eb # 3.03 BYTES_ORIGINAL 6A 00 ; push 00000000 E8 ?? ?? FF FF ; call ???????? 85 c0 ; test eax eax 75 ?? ; jne 00448B25 68 ?? ?? ?? 00 ; push "Copying of text from this document is not allowed." 6A FF ; push FFFFFFFF E8 ?? ?? ?? FF ; call 00409A80 83 C4 08 ; add esp, 00000008 BYTES_PATCH ?? ?? ?? ?? ?? ?? ?? ?? ?? eb BYTES_ORIGINAL F6 ?? ?? ?? ; TEST BYTE PTR DS:[EAX+4C],10 75 ?? ; JNZ SHORT pdftotex.0045D2B1 83 CB FF ; OR EBX,FFFFFFFF 68 ?? ?? ?? 00 ; PUSH "Copying of text from this document is not allowed." 8D ?? ?? ; LEA EDI,DWORD PTR DS:[EBX+6] E8 ?? ?? ?? FF ; CALL pdftotex.0040E1B0 BYTES_PATCH ?? ?? ?? ?? eb BYTES_ORIGINAL F6 ?? ?? ?? ; TEST BYTE PTR DS:[EAX+4C],10 75 ?? ; JNZ SHORT pdftotex.0045D2B1 83 CB FF ; OR EBX,FFFFFFFF 8D ?? ?? ; LEA EDI,DWORD PTR DS:[EBX+6] 68 ?? ?? ?? 00 ; PUSH "Copying of text from this document is not allowed." E8 ?? ?? ?? FF ; CALL pdftotex.0040E1B0 BYTES_PATCH ?? ?? ?? ?? eb ====================================================================================