Beispiel #1
0
// --------------------------------------------------------------------------- 
    public void Write(Stream stream) {
      using (ZipFile zip = new ZipFile()) {
        ParsingHelloWorld example = new ParsingHelloWorld();
        byte[] ePdf = example.CreatePdf();
        zip.AddEntry(PDF, ePdf);
        HelloWorld hello = new HelloWorld();
        byte[] hPdf = Utility.PdfBytes(hello);
        zip.AddEntry(Utility.ResultFileName(hello.ToString() + ".pdf"), hPdf);       
        zip.AddEntry(TEXT1, example.ParsePdf(hPdf));
        zip.AddEntry(TEXT2, example.ParsePdf(ePdf));
        zip.AddEntry(TEXT3, example.ExtractText(ePdf));
        zip.Save(stream);             
      }
    }
Beispiel #2
0
// ---------------------------------------------------------------------------
        public void Write(Stream stream)
        {
            using (ZipFile zip = new ZipFile()) {
                ParsingHelloWorld example = new ParsingHelloWorld();
                byte[]            ePdf    = example.CreatePdf();
                zip.AddEntry(PDF, ePdf);
                HelloWorld hello = new HelloWorld();
                byte[]     hPdf  = Utility.PdfBytes(hello);
                zip.AddEntry(Utility.ResultFileName(hello.ToString() + ".pdf"), hPdf);
                zip.AddEntry(TEXT1, example.ParsePdf(hPdf));
                zip.AddEntry(TEXT2, example.ParsePdf(ePdf));
                zip.AddEntry(TEXT3, example.ExtractText(ePdf));
                zip.Save(stream);
            }
        }