Lines 103-108
Link Here
|
103 |
throw new RuntimeException("FlateFilter configuration error", e); |
103 |
throw new RuntimeException("FlateFilter configuration error", e); |
104 |
} |
104 |
} |
105 |
this.pdfFilter = flate; |
105 |
this.pdfFilter = flate; |
|
|
106 |
this.disallowMultipleFilters(); |
106 |
|
107 |
|
107 |
// Handle transparency channel if applicable; note that for palette images the transparency is |
108 |
// Handle transparency channel if applicable; note that for palette images the transparency is |
108 |
// not TRANSLUCENT |
109 |
// not TRANSLUCENT |
Lines 154-159
Link Here
|
154 |
BitmapImage alphaMask = new BitmapImage("Mask:" + this.getKey(), image.getSize().getWidthPx(), |
155 |
BitmapImage alphaMask = new BitmapImage("Mask:" + this.getKey(), image.getSize().getWidthPx(), |
155 |
image.getSize().getHeightPx(), baos.toByteArray(), null); |
156 |
image.getSize().getHeightPx(), baos.toByteArray(), null); |
156 |
alphaMask.setPDFFilter(transFlate); |
157 |
alphaMask.setPDFFilter(transFlate); |
|
|
158 |
alphaMask.disallowMultipleFilters(); |
157 |
alphaMask.setColorSpace(new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_GRAY)); |
159 |
alphaMask.setColorSpace(new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_GRAY)); |
158 |
softMask = doc.addImage(null, alphaMask).makeReference(); |
160 |
softMask = doc.addImage(null, alphaMask).makeReference(); |
159 |
} |
161 |
} |