iText可以制作中文PDF文件的JAVA源程序最新版下载

源代码在线查看: pdficcbased.java

软件大小: 2494 K
上传用户: WJQ198926
关键词: iText JAVA 源程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.lowagie.text.pdf;								import java.io.*;				import java.awt.color.ICC_Profile;				import com.lowagie.text.Document;				import com.lowagie.text.ExceptionConverter;								/**				 * A PdfICCBased defines a ColorSpace				 *				 * @see		PdfStream				 */								class PdfICCBased extends PdfStream {				    				    protected int NumberOfComponents;				    				    PdfICCBased(ICC_Profile profile) {				        super();				        try {				            NumberOfComponents = profile.getNumComponents();				            PdfNumber pNumber = new PdfNumber(NumberOfComponents);				            switch (NumberOfComponents) {				                case 1:				                    put(PdfName.ALTERNATE, PdfName.DEVICEGRAY);				                    break;				                case 3:				                    put(PdfName.ALTERNATE, PdfName.DEVICERGB);				                    break;				                case 4:				                    put(PdfName.ALTERNATE, PdfName.DEVICECMYK);				                    break;				                default:				                    throw new PdfException(NumberOfComponents + " component(s) is not supported in PDF1.4");				            }				            put(PdfName.N, new PdfNumber(NumberOfComponents));				            bytes = profile.getData();				            flateCompress();				        } catch (Exception e) {				            throw new ExceptionConverter(e);				        }				    }				}							

相关资源