Example #1
0
        protected override void CreateSmallLabel(PDFDocument document, TachographDocument tachographDocument)
        {
            var table = new PdfPTable(4);

            table.TotalWidth = 136;
            table.SetWidths(new float[] { 58, 10, 10, 58 });

            GetSmallImage(document, table);

            document.AddSpannedCell(table, Resources.TXT_TACHOGRAPH_AND_M1N1_INSPECTION_PLATE, 4, document.GetSmallerFont(), 29);

            document.AddSpannedCell(table, string.Format(Resources.TXT_W_FACTOR_IMP_KM, tachographDocument.WFactor), 2, document.GetXSmallFont(false), 15);
            document.AddSpannedCell(table, string.Format(Resources.TXT_K_FACTOR_IMP_KM, tachographDocument.KFactor), 2, document.GetXSmallFont(false), 15);

            document.AddSpannedCell(table, string.Format(Resources.TXT_L_FACTOR_MM, tachographDocument.LFactor), 1, document.GetXSmallFont(false), 15, 58);
            document.AddSpannedCell(table, string.Format(Resources.TXT_VIN_SMALL_LABEL, tachographDocument.VIN), 3, document.GetXXSmallFont(), 16, 68);

            document.AddSpannedCell(table, string.Format(Resources.TXT_TYRE_SIZE_SMALL_LABEL, tachographDocument.TyreSize), 4, document.GetSmallFont(false), 17, Element.ALIGN_LEFT);
            document.AddSpannedCell(table, string.Format(Resources.TXT_SERIAL_NUMBER_SMALL_LABEL, tachographDocument.SerialNumber), 4, document.GetSmallFont(false), 17, Element.ALIGN_LEFT);

            document.AddSpannedCell(table, string.Format(Resources.TXT_M1N1_SERIAL_SMALL_LABEL, tachographDocument.TachographAdapterSerialNumber), 4, document.GetSmallFont(false), 18, Element.ALIGN_LEFT);
            document.AddSpannedCell(table, string.Format(Resources.TXT_LOCATION_SMALL_LABEL, tachographDocument.TachographAdapterLocation), 4, document.GetSmallFont(false), 16, Element.ALIGN_LEFT);
            document.AddSpannedCell(table, string.Format(Resources.TXT_COLOR_SMALL_LABEL, tachographDocument.TachographCableColor), 4, document.GetSmallFont(false), 16, Element.ALIGN_LEFT);

            GetCompanyDetails(document, table, 69, 3, document.GetSmallerFont());

            document.AddSpannedCell(table, Resources.TXT_SMALL_LABEL_DATE + GetCalibrationTime(tachographDocument.CalibrationTime), 1, document.GetRegularFont(false));
            document.AddSpannedCell(table, GetLicenseNumberParagraph(document, false), 4, 16, Element.ALIGN_LEFT);

            table.WriteSelectedRows(0, -1, document.Document.LeftMargin + 2, document.Height - 103, document.ContentByte);
        }