Exemple #1
0
// ---------------------------------------------------------------------------
    public void Write(Stream stream) {
      using (ZipFile zip = new ZipFile()) {
        FontFileAndSizes ffs = new FontFileAndSizes();
        BaseFont bf;
        bf = BaseFont.CreateFont(FONT, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
        zip.AddEntry(RESULT[0], ffs.CreatePdf(bf, TEXT));
        bf = BaseFont.CreateFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED);
        zip.AddEntry(RESULT[1], ffs.CreatePdf(bf, TEXT));
        zip.AddEntry(RESULT[2], ffs.CreatePdf(bf, OOOO));
        bf = BaseFont.CreateFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED);
        bf.CompressionLevel = 9;
        zip.AddEntry(RESULT[3], ffs.CreatePdf(bf, TEXT));
        bf = BaseFont.CreateFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED);
        bf.Subset = false;
        zip.AddEntry(RESULT[4], ffs.CreatePdf(bf, TEXT)); 
        zip.Save(stream);             
      }
    }
Exemple #2
0
// ---------------------------------------------------------------------------
        public void Write(Stream stream)
        {
            using (ZipFile zip = new ZipFile()) {
                FontFileAndSizes ffs = new FontFileAndSizes();
                BaseFont         bf;
                bf = BaseFont.CreateFont(FONT, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
                zip.AddEntry(RESULT[0], ffs.CreatePdf(bf, TEXT));
                bf = BaseFont.CreateFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED);
                zip.AddEntry(RESULT[1], ffs.CreatePdf(bf, TEXT));
                zip.AddEntry(RESULT[2], ffs.CreatePdf(bf, OOOO));
                bf = BaseFont.CreateFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED);
                bf.CompressionLevel = 9;
                zip.AddEntry(RESULT[3], ffs.CreatePdf(bf, TEXT));
                bf        = BaseFont.CreateFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED);
                bf.Subset = false;
                zip.AddEntry(RESULT[4], ffs.CreatePdf(bf, TEXT));
                zip.Save(stream);
            }
        }