| Code with Finding: |
class PdfWriter {
/**
* Use this method to sets the default colorspace that will be applied
* to all the document. The colorspace is only applied if another colorspace
* with the same name is not present in the content.
* <p>
* The colorspace is applied immediately when creating templates and
* at the page end for the main document content.
* @param key the name of the colorspace. It can be <CODE>PdfName.DEFAULTGRAY</CODE>, <CODE>PdfName.DEFAULTRGB</CODE>
* or <CODE>PdfName.DEFAULTCMYK</CODE>
* @param cs the colorspace. A <CODE>null</CODE> or <CODE>PdfNull</CODE> removes any colorspace with the same name
*/
public void setDefaultColorspace(final PdfName key, final PdfObject cs) {
if (cs == null || cs.isNull())
defaultColorspace.remove(key);
defaultColorspace.put(key, cs);
}
}
|