Esempio n. 1
0
 public PdfPage CreatePage(PdfPageSizes pageSize, PdfPageOrientation orientation)
 {
     switch(pageSize) {
         case PdfPageSizes.A1:
             return In_CreatePage(31.45f, 22.22f, orientation);
         case PdfPageSizes.A2:
             return In_CreatePage(22.22f, 15.71f, orientation);
         case PdfPageSizes.A3:
             return In_CreatePage(15.71f, 11.11f, orientation);
         case PdfPageSizes.A4:
             return In_CreatePage(11.11f, 7.86f, orientation);
         case PdfPageSizes.A5:
             return In_CreatePage(7.86f, 5.54f, orientation);
         default:
             throw new InvalidOperationException("Parameter pageSize must be a member of the PdfPageSizes enumeration.");
     }
 }
Esempio n. 2
0
        public PdfPage CreatePage(PdfPageSizes pageSize, PdfPageOrientation orientation)
        {
            switch (pageSize)
            {
            case PdfPageSizes.A1:
                return(In_CreatePage(31.45f, 22.22f, orientation));

            case PdfPageSizes.A2:
                return(In_CreatePage(22.22f, 15.71f, orientation));

            case PdfPageSizes.A3:
                return(In_CreatePage(15.71f, 11.11f, orientation));

            case PdfPageSizes.A4:
                return(In_CreatePage(11.11f, 7.86f, orientation));

            case PdfPageSizes.A5:
                return(In_CreatePage(7.86f, 5.54f, orientation));

            default:
                throw new InvalidOperationException("Parameter pageSize must be a member of the PdfPageSizes enumeration.");
            }
        }