1 47 package com.lowagie.text.pdf; 48 49 import java.io.IOException ; 50 51 54 public class PdfPSXObject extends PdfTemplate { 55 56 57 protected PdfPSXObject() { 58 super(); 59 } 60 61 65 public PdfPSXObject(PdfWriter wr) { 66 super(wr); 67 } 68 69 75 76 PdfStream getFormXObject() throws IOException { 77 PdfStream s = new PdfStream(content.toByteArray()); 78 s.put(PdfName.TYPE, PdfName.XOBJECT); 79 s.put(PdfName.SUBTYPE, PdfName.PS); 80 s.flateCompress(); 81 return s; 82 } 83 84 89 90 public PdfContentByte getDuplicate() { 91 PdfPSXObject tpl = new PdfPSXObject(); 92 tpl.writer = writer; 93 tpl.pdf = pdf; 94 tpl.thisReference = thisReference; 95 tpl.pageResources = pageResources; 96 tpl.separator = separator; 97 return tpl; 98 } 99 } 100 | Popular Tags |