/** * Checks if the AGPL version is used. * @return returns true if the AGPL version is used. */ public static boolean isAGPLVersion() { return getInstance().getVersion().indexOf(AGPL) > 0; } }
/** * Checks if the AGPL version is used. * @return returns true if the AGPL version is used. */ public static boolean isAGPLVersion() { return getInstance().getVersion().indexOf(AGPL) > 0; } }
/** * Constructs a PdfSignatureAppearance object. * @param writer the writer to which the signature will be written. */ PdfSignatureAppearance(PdfStamperImp writer) { this.writer = writer; signDate = new GregorianCalendar(); fieldName = getNewSigName(); signatureCreator = Version.getInstance().getVersion(); }
/** * Constructs a PdfSignatureAppearance object. * @param writer the writer to which the signature will be written. */ PdfSignatureAppearance(PdfStamperImp writer) { this.writer = writer; signDate = new GregorianCalendar(); fieldName = getNewSigName(); signatureCreator = Version.getInstance().getVersion(); }
public PdfSchema() { super("xmlns:" + DEFAULT_XPATH_ID + "=\"" + DEFAULT_XPATH_URI + "\""); addProducer(Version.getInstance().getVersion()); }
public PdfSchema() { super("xmlns:" + DEFAULT_XPATH_ID + "=\"" + DEFAULT_XPATH_URI + "\""); addProducer(Version.getInstance().getVersion()); }
/** * Adds the name of the producer to the document. */ void addProducer() { put(PdfName.PRODUCER, new PdfString(Version.getInstance().getVersion())); }
/** * Adds the name of the producer to the document. */ void addProducer() { put(PdfName.PRODUCER, new PdfString(Version.getInstance().getVersion())); }
/** * Adds the producer to a Document. * * @return <CODE>true</CODE> if successful, <CODE>false</CODE> otherwise */ public boolean addProducer() { try { return add(new Meta(Element.PRODUCER, Version.getInstance().getVersion())); } catch (DocumentException de) { throw new ExceptionConverter(de); } }
/** * Adds the producer to a Document. * * @return <CODE>true</CODE> if successful, <CODE>false</CODE> otherwise */ public boolean addProducer() { try { return add(new Meta(Element.PRODUCER, Version.getInstance().getVersion())); } catch (DocumentException de) { throw new ExceptionConverter(de); } }
/** * Creates an XmpWriter. * @param os * @param utfEncoding * @param extraSpace * @throws IOException */ public XmpWriter(OutputStream os, String utfEncoding, int extraSpace) throws IOException { outputStream = os; serializeOptions = new SerializeOptions(); if (UTF16BE.equals(utfEncoding) || UTF16.equals(utfEncoding)) serializeOptions.setEncodeUTF16BE(true); else if (UTF16LE.equals(utfEncoding)) serializeOptions.setEncodeUTF16LE(true); serializeOptions.setPadding(extraSpace); xmpMeta = XMPMetaFactory.create(); xmpMeta.setObjectName(XMPConst.TAG_XMPMETA); xmpMeta.setObjectName(""); try { xmpMeta.setProperty(XMPConst.NS_DC, DublinCoreProperties.FORMAT, "application/pdf"); xmpMeta.setProperty(XMPConst.NS_PDF, PdfProperties.PRODUCER, Version.getInstance().getVersion()); } catch (XMPException xmpExc) {} }
/** * Creates an XmpWriter. * @param os * @param utfEncoding * @param extraSpace * @throws IOException */ public XmpWriter(OutputStream os, String utfEncoding, int extraSpace) throws IOException { outputStream = os; serializeOptions = new SerializeOptions(); if (UTF16BE.equals(utfEncoding) || UTF16.equals(utfEncoding)) serializeOptions.setEncodeUTF16BE(true); else if (UTF16LE.equals(utfEncoding)) serializeOptions.setEncodeUTF16LE(true); serializeOptions.setPadding(extraSpace); xmpMeta = XMPMetaFactory.create(); xmpMeta.setObjectName(XMPConst.TAG_XMPMETA); xmpMeta.setObjectName(""); try { xmpMeta.setProperty(XMPConst.NS_DC, DublinCoreProperties.FORMAT, "application/pdf"); xmpMeta.setProperty(XMPConst.NS_PDF, PdfProperties.PRODUCER, Version.getInstance().getVersion()); } catch (XMPException xmpExc) {} }
if (producer == null || version.getVersion().indexOf(version.getProduct()) == -1) { producer = version.getVersion(); } else { int idx = producer.indexOf("; modified using"); buf = new StringBuffer(producer.substring(0, idx)); buf.append("; modified using "); buf.append(version.getVersion()); producer = buf.toString();
if (producer == null || version.getVersion().indexOf(version.getProduct()) == -1) { producer = version.getVersion(); } else { int idx = producer.indexOf("; modified using"); buf = new StringBuffer(producer.substring(0, idx)); buf.append("; modified using "); buf.append(version.getVersion()); producer = buf.toString();
getInfo().put(PdfName.PRODUCER, new PdfString(Version.getInstance().getVersion()));
wr.addField(new TiffWriter.FieldRational(TIFFConstants.TIFFTAG_YRESOLUTION, new int[]{300,1})); wr.addField(new TiffWriter.FieldShort(TIFFConstants.TIFFTAG_RESOLUTIONUNIT, TIFFConstants.RESUNIT_INCH)); wr.addField(new TiffWriter.FieldAscii(TIFFConstants.TIFFTAG_SOFTWARE, Version.getInstance().getVersion())); ByteArrayOutputStream comp = new ByteArrayOutputStream(); TiffWriter.compressLZW(comp, 2, imageBytes, height, 4, stride);
wr.addField(new TiffWriter.FieldRational(TIFFConstants.TIFFTAG_YRESOLUTION, new int[]{300,1})); wr.addField(new TiffWriter.FieldShort(TIFFConstants.TIFFTAG_RESOLUTIONUNIT, TIFFConstants.RESUNIT_INCH)); wr.addField(new TiffWriter.FieldAscii(TIFFConstants.TIFFTAG_SOFTWARE, Version.getInstance().getVersion())); ByteArrayOutputStream comp = new ByteArrayOutputStream(); TiffWriter.compressLZW(comp, 2, imageBytes, height, 4, stride);