iTextSharp.text.pdf.Pfm2afm.Openpfm C# (CSharp) Метод

Openpfm() приватный Метод

private Openpfm ( ) : void
Результат void
        private void Openpfm()
        {
            inp.Seek(0);
            vers = inp.ReadShortLE();
            h_len = inp.ReadIntLE();
            copyright = ReadString(60);
            type = inp.ReadShortLE();
            points = inp.ReadShortLE();
            verres = inp.ReadShortLE();
            horres = inp.ReadShortLE();
            ascent = inp.ReadShortLE();
            intleading = inp.ReadShortLE();
            extleading = inp.ReadShortLE();
            italic = (byte)inp.Read();
            uline = (byte)inp.Read();
            overs = (byte)inp.Read();
            weight = inp.ReadShortLE();
            charset = (byte)inp.Read();
            pixwidth = inp.ReadShortLE();
            pixheight = inp.ReadShortLE();
            kind = (byte)inp.Read();
            avgwidth = inp.ReadShortLE();
            maxwidth = inp.ReadShortLE();
            firstchar = inp.Read();
            lastchar = inp.Read();
            defchar = (byte)inp.Read();
            brkchar = (byte)inp.Read();
            widthby = inp.ReadShortLE();
            device = inp.ReadIntLE();
            face = inp.ReadIntLE();
            bits = inp.ReadIntLE();
            bitoff = inp.ReadIntLE();
            extlen = inp.ReadShortLE();
            psext = inp.ReadIntLE();
            chartab = inp.ReadIntLE();
            res1 = inp.ReadIntLE();
            kernpairs = inp.ReadIntLE();
            res2 = inp.ReadIntLE();
            fontname = inp.ReadIntLE();
            if (h_len != inp.Length || extlen != 30 || fontname < 75 || fontname > 512)
                throw new IOException(MessageLocalization.GetComposedMessage("not.a.valid.pfm.file"));
            inp.Seek(psext + 14);
            capheight = inp.ReadShortLE();
            xheight = inp.ReadShortLE();
            ascender = inp.ReadShortLE();
            descender = inp.ReadShortLE();
        }

Usage Example

Пример #1
0
        /**
         * Converts a PFM file into an AFM file.
         * @param inp the PFM file
         * @param outp the AFM file
         * @throws IOException on error
         */
        public static void Convert(RandomAccessFileOrArray inp, Stream outp)
        {
            Pfm2afm p = new Pfm2afm(inp, outp);

            p.Openpfm();
            p.Putheader();
            p.Putchartab();
            p.Putkerntab();
            p.Puttrailer();
            p.outp.Flush();
        }
All Usage Examples Of iTextSharp.text.pdf.Pfm2afm::Openpfm