iTextSharp.text.pdf.PdfWriter.SetOutputIntents C# (CSharp) Méthode

SetOutputIntents() public méthode

public SetOutputIntents ( PdfReader reader, bool checkExistence ) : bool
reader PdfReader
checkExistence bool
Résultat bool
        public virtual bool SetOutputIntents(PdfReader reader, bool checkExistence)
        {
            PdfDictionary catalog = reader.Catalog;
            PdfArray outs = catalog.GetAsArray(PdfName.OUTPUTINTENTS);
            if (outs == null)
                return false;
            List<PdfObject> arr = outs.ArrayList;
            if (outs.Size == 0)
                return false;
            PdfDictionary outa = outs.GetAsDict(0);
            PdfObject obj = PdfReader.GetPdfObject(outa.Get(PdfName.S));
            if (obj == null || !PdfName.GTS_PDFX.Equals(obj))
                return false;
            if (checkExistence)
                return true;
            PRStream stream = (PRStream)PdfReader.GetPdfObject(outa.Get(PdfName.DESTOUTPUTPROFILE));
            byte[] destProfile = null;
            if (stream != null) {
                destProfile = PdfReader.GetStreamBytes(stream);
            }
            SetOutputIntents(GetNameString(outa, PdfName.OUTPUTCONDITIONIDENTIFIER), GetNameString(outa, PdfName.OUTPUTCONDITION),
                GetNameString(outa, PdfName.REGISTRYNAME), GetNameString(outa, PdfName.INFO), destProfile);
            return true;
        }

Same methods

PdfWriter::SetOutputIntents ( String outputConditionIdentifier, String outputCondition, String registryName, String info, ICC_Profile colorProfile ) : void
PdfWriter::SetOutputIntents ( String outputConditionIdentifier, String outputCondition, String registryName, String info, byte destOutputProfile ) : void