pdffonts /workspace/output/catalogue_press.pdf; python - <<'PY'
import fitz,json,unicodedata,re,hashlib
from pypdf import PdfReader
r=PdfReader('/workspace/output/catalogue_press.pdf');print('pages',len(r.pages));print(r.metadata)
oi=r.trailer['/Root']['/OutputIntents'][0].get_object();icc=oi['/DestOutputProfile'].get_data();ref=open('/workspace/input/profiles/ISOcoated_v2_300_bas.icc','rb').read();print('intent',oi, 'icc same',icc==ref,'len',len(icc))
print(r.trailer['/Root']['/Metadata'].get_data().decode()[:4000]);print('boxes',r.pages[0].mediabox,r.pages[0].trimbox,r.pages[0].bleedbox)
f=fitz.open('/workspace/output/catalogue_press.pdf');norm=lambda s:' '.join(unicodedata.normalize('NFKC',s).split());c=json.load(open('/workspace/scratch/approved.json'));plan=json.load(open('/workspace/input/page_plan.json'))['pages'];print('COPY:')
for p in plan:
 text=norm(f[p['page']-1].get_text())
 for s in p['skus']:
  print(p['page'],s,[(k,norm(c[s][k]) in text) for k in ['name','price','description']])
PY