I used pdftk to get the uncompressed version of of the pdf.
Code: Select all
cmd := """C:\Program Files (x86)\PDFtk Server\bin\pdftk.exe"" """ . src . """ output """ . compressOut . """ uncompress"
Code: Select all
fileRead pdfRaw ,% compressOut ,cp866 ;<-same encoding as notepad++ autodetects
fixedText := regexReplace(pdfRaw ,"BT(?:(?!ET).)*?DRAWING IS NOT(?:(?!ET).)*?ET","")
fileAppend,% fixedText , % fixedRawOut
Code: Select all
cmd := """C:\Program Files (x86)\PDFtk Server\bin\pdftk.exe"" """ . fixedRawOut . """ output """ . fixedCompressOut . """ compress"
If i do it with fileOpen i get the same result
Code: Select all
file := fileOpen(compressOut ,"r","cp866")
pdfRaw := file.read(file.length)