Class PdfSmartCopy
- Namespace
- iTextSharp.text.pdf
- Assembly
- iTextSharp.LGPLv2.Core.dll
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.
public class PdfSmartCopy : PdfCopy, IDocListener, IElementListener, IDisposable, IPdfViewerPreferences, IPdfEncryptionSettings, IPdfVersion, IPdfDocumentActions, IPdfPageActions, IPdfXConformance, IPdfRunDirection, IPdfAnnotations
- Inheritance
-
PdfSmartCopy
- Implements
- Inherited Members
Constructors
PdfSmartCopy(Document, Stream)
Creates a PdfSmartCopy instance.
public PdfSmartCopy(Document document, Stream os)
Parameters
Methods
CopyIndirect(PrIndirectReference)
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.
protected override PdfIndirectReference CopyIndirect(PrIndirectReference inp)