Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: PdfSmartCopy [javadoc | source]
java.lang.Object
   com.lowagie.text.DocWriter
      com.lowagie.text.pdf.PdfWriter
         com.lowagie.text.pdf.PdfCopy
            com.lowagie.text.pdf.PdfSmartCopy

All Implemented Interfaces:
    DocListener

PdfSmartCopy has the same functionality as PdfCopy, but when resources (such as fonts, images,...) are encountered, a reference to these resources is saved in a cache, so that they can be reused. This requires more memory, but reduces the file size of the resulting PDF document.
Nested Class Summary:
static class  PdfSmartCopy.ByteStore   
Fields inherited from com.lowagie.text.pdf.PdfCopy:
indirects,  indirectMap,  currentObjectNum,  reader,  acroForm,  namePtr,  fieldArray,  fieldTemplates
Fields inherited from com.lowagie.text.pdf.PdfWriter:
PageLayoutSinglePage,  PageLayoutOneColumn,  PageLayoutTwoColumnLeft,  PageLayoutTwoColumnRight,  PageModeUseNone,  PageModeUseOutlines,  PageModeUseThumbs,  PageModeFullScreen,  PageModeUseOC,  HideToolbar,  HideMenubar,  HideWindowUI,  FitWindow,  CenterWindow,  NonFullScreenPageModeUseNone,  NonFullScreenPageModeUseOutlines,  NonFullScreenPageModeUseThumbs,  NonFullScreenPageModeUseOC,  DirectionL2R,  DirectionR2L,  DisplayDocTitle,  PrintScalingNone,  ViewerPreferencesMask,  AllowPrinting,  AllowModifyContents,  AllowCopy,  AllowModifyAnnotations,  AllowFillIn,  AllowScreenReaders,  AllowAssembly,  AllowDegradedPrinting,  STRENGTH40BITS,  STRENGTH128BITS,  DOCUMENT_CLOSE,  WILL_SAVE,  DID_SAVE,  WILL_PRINT,  DID_PRINT,  PAGE_OPEN,  PAGE_CLOSE,  SIGNATURE_EXISTS,  SIGNATURE_APPEND_ONLY,  VERSION_1_2,  VERSION_1_3,  VERSION_1_4,  VERSION_1_5,  VERSION_1_6,  HEADER,  prevxref,  root,  imageDictionary,  formXObjects,  formXObjectsCounter,  fontNumber,  colorNumber,  patternNumber,  directContent,  directContentUnder,  documentFonts,  documentColors,  documentPatterns,  documentShadings,  documentShadingPatterns,  patternColorspaceRGB,  patternColorspaceGRAY,  patternColorspaceCMYK,  documentSpotPatterns,  documentExtGState,  documentLayers,  documentOCG,  documentOCGorder,  OCProperties,  OCGRadioGroup,  defaultColorspace,  PDFXNONE,  PDFX1A2001,  PDFX32002,  PDFXKEY_COLOR,  PDFXKEY_CMYK,  PDFXKEY_RGB,  PDFXKEY_FONT,  PDFXKEY_IMAGE,  PDFXKEY_GSTATE,  PDFXKEY_LAYER,  body,  pdf,  crypto,  importedPages,  currentPdfReaderInstance,  pageReferences,  currentPageNumber,  group,  SPACE_CHAR_RATIO_DEFAULT,  NO_SPACE_CHAR_RATIO,  RUN_DIRECTION_DEFAULT,  RUN_DIRECTION_NO_BIDI,  RUN_DIRECTION_LTR,  RUN_DIRECTION_RTL,  runDirection,  fullCompression
Fields inherited from com.lowagie.text.DocWriter:
NEWLINE,  TAB,  LT,  SPACE,  EQUALS,  QUOTE,  GT,  FORWARD,  pageSize,  document,  os,  open,  pause,  closeStream
Constructor:
 public PdfSmartCopy(Document document,
    OutputStream os) throws DocumentException 
    Creates a PdfSmartCopy instance.
Method from com.lowagie.text.pdf.PdfSmartCopy Summary:
copyIndirect
Methods from com.lowagie.text.pdf.PdfCopy:
add,   add,   addAnnotation,   addPage,   close,   copyAcroForm,   copyArray,   copyDictionary,   copyIndirect,   copyObject,   copyStream,   createPageStamp,   freeReader,   getCatalog,   getImportedPage,   isRotateContents,   setFromIPage,   setFromReader,   setRotateContents
Methods from com.lowagie.text.pdf.PdfWriter:
add,   add,   add,   addAnnotation,   addAnnotation,   addCalculationOrder,   addDirectImageSimple,   addDirectTemplateSimple,   addJavaScript,   addJavaScript,   addJavaScript,   addLocalDestinations,   addOCGRadioGroup,   addSharedObjectsToBody,   addSimple,   addSimple,   addSimpleExtGState,   addSimpleLayer,   addSimplePattern,   addSimplePatternColorspace,   addSimpleShading,   addSimpleShadingPattern,   addToBody,   addToBody,   addToBody,   addToBody,   addToBody,   addToBody,   breakTableIfDoesntFit,   checkPDFXConformance,   close,   eliminateFontSubset,   fitsPage,   fitsPage,   fitsPage,   fitsPage,   freeReader,   getAcroForm,   getCatalog,   getCurrentDocumentSize,   getCurrentPage,   getCurrentPageNumber,   getDefaultColorspace,   getDirectContent,   getDirectContentUnder,   getEncryption,   getExtraCatalog,   getGroup,   getImageReference,   getImportedPage,   getIndirectReferenceNumber,   getInfo,   getInstance,   getInstance,   getNewObjectNumber,   getOCProperties,   getOs,   getPDFXConformance,   getPageEvent,   getPageNumber,   getPageReference,   getPdfDocument,   getPdfIndirectReference,   getPdfTable,   getReaderFile,   getRootOutline,   getRunDirection,   getSpaceCharRatio,   getTableBottom,   getVerticalPosition,   isFullCompression,   isPaused,   isStrictImageSequence,   open,   registerLayer,   reorderPages,   resetContent,   setAdditionalAction,   setBoxSize,   setCropBoxSize,   setDefaultColorspace,   setDuration,   setEncryption,   setEncryption,   setFullCompression,   setGroup,   setLinearPageMode,   setOpenAction,   setOpenAction,   setOutputIntents,   setOutputIntents,   setPDFXConformance,   setPageAction,   setPageEmpty,   setPageEvent,   setPageLabels,   setPdfVersion,   setRunDirection,   setSigFlags,   setSpaceCharRatio,   setStrictImageSequence,   setThumbnail,   setTransition,   setViewerPreferences
Methods from com.lowagie.text.DocWriter:
add,   addTabs,   close,   flush,   getISOBytes,   isCloseStream,   isPaused,   newPage,   open,   pause,   resetFooter,   resetHeader,   resetPageCount,   resume,   setCloseStream,   setFooter,   setHeader,   setMarginMirroring,   setMargins,   setPageCount,   setPageSize,   write,   write,   writeEnd,   writeEnd,   writeMarkupAttributes,   writeStart
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.PdfSmartCopy Detail:
 protected PdfIndirectReference copyIndirect(PRIndirectReference in) throws BadPdfFormatException, IOException 
    Translate a PRIndirectReference to a PdfIndirectReference In addition, translates the object numbers, and copies the referenced object to the output file if it wasn't available in the cache yet. If it's in the cache, the reference to the already used stream is returned. NB: PRIndirectReferences (and PRIndirectObjects) really need to know what file they came from, because each file has its own namespace. The translation we do from their namespace to ours is *at best* heuristic, and guaranteed to fail under some circumstances.