Anchor | ||||
---|---|---|---|---|
|
Version
Before XFRX 2322.06
Symptoms
Extracted image looks weird or is empty.
Cause
Alpha layer defined in PDF file use inverted values.
Workaround
Use hack which drop flag of alpha layer.
Code Block |
---|
LOCAL m.loPDFR, m.lnError, m.liCount, m.lcFilePDF LOCAL ARRAY m,laImgs(1) m.lcFilePDF="some.pdf" m.loPDFR = Evaluate([xfrx("PDF#READER")]) If loPDFR.openDocument(m.lcFilePDF) < 0 Return "" Endif m.lnError = m.loPDFR.ReadDocument() m.liCount = m.loPDFR.GetListImages(-1, @laImgs) * drop flag of alpha layer for all images REPLACE SMASKID WITH 0 FOR SMASKID>0 IN (m.loPDFR.cImages) m.loPDFR.SaveImages(@laIMGS, m.lcFilePDF+"_pic") loPDFR.closeDocument() |