Prints a ReadablePartial.
<p>
Neither the override chronology nor the override zone are used
by this method.

@param appendable  the destination to format to, not null
@param partial  partial to format
@since 2.0
551380
public void printTo(Appendable appendable, ReadablePartial partial) throws IOException {
        InternalPrinter printer = requirePrinter();
        if (partial == null) {
            throw new IllegalArgumentException("The partial must not be null");
        }
        printer.printTo(appendable, partial, iLocale);
    }
374216
public void appendXMLToAutomaticStyle(final XMLUtil util,
										  final Appendable appendable) throws IOException {
		this.pageLayoutStyle.appendXMLToAutomaticStyle(util, appendable);
	}
418943
public void printEndRecordData(Rec record, PrintWriter out, int iPrintOptions)
    {
        String strRecordName = record.getTableNames(false);
        if ((strRecordName == null) || (strRecordName.length() == 0))
        	strRecordName = "Record";
        out.println(Utility.endTag(strRecordName));
    }
383101
public void printDataEndField(PrintWriter out, int iPrintOptions)
    {
        if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
        {
        }
        else 
            out.println("</tr>");
    }
1203390
public void printTo(StringBuffer buf, ReadablePeriod period) {
        checkPrinter();
        checkPeriod(period);
        
        getPrinter().printTo(buf, period, iLocale);
    }
967806
public void appendPreamble(final XMLUtil util, final Appendable appendable) throws IOException {
        if (this.preambleWritten)
            return;

        appendable.append("<table:table");
        util.appendEAttribute(appendable, "table:name", this.builder.getName());
        util.appendEAttribute(appendable, "table:style-name",
                this.builder.getStyleName());
        util.appendAttribute(appendable, "table:print", false);
        appendable.append("><office:forms");
        util.appendAttribute(appendable, "form:automatic-focus", false);
        util.appendAttribute(appendable, "form:apply-design-mode", false);
        appendable.append("/>");
        this.appendColumnStyles(this.builder.getColumnStyles(), appendable, util);
        this.preambleWritten = true;
    }
515390
@Override
    public int print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        Set<ElementPosition> positions, // optional
        boolean quickPath
    ) throws IOException {

        BigDecimal value =
            formattable.get(this.element).setScale(
                this.scale,
                RoundingMode.FLOOR);
        String digits = value.toPlainString();
        int p = 0;
        int s = 0;
        int separator = -1;
        int n = digits.length();

        for (int i = 0; i < n; i++) {
            char c = digits.charAt(i);
            if (c == '.') {
                separator = i;
            } else if (separator >= 0) {
                s++;
            } else {
                p++;
            }
        }

        int delta = this.precision - this.scale - p;

        if (delta < 0) {
            throw new IllegalArgumentException(
                "Integer part of element value exceeds fixed format width: "
                + digits);
        }

        StringBuilder sb = new StringBuilder(this.precision + 1);

        for (int i = 0; i < delta; i++) {
            sb.append('0');
        }

        for (int i = 0; i < p; i++) {
            sb.append(digits.charAt(i));
        }

        this.decimalSeparator.print(formattable, sb, attributes, positions, quickPath);

        for (int i = 0; i < s; i++) {
            sb.append(digits.charAt(p + 1 + i));
        }

        for (int i = 0; i < this.scale - s; i++) {
            sb.append('0');
        }

        digits = sb.toString();

        char zeroChar = (
            quickPath
                ? this.zeroDigit
                : attributes.get(Attributes.ZERO_DIGIT, Character.valueOf('0')).charValue());

        if (zeroChar != '0') {
            int diff = zeroChar - '0';
            char[] characters = digits.toCharArray();

            for (int i = 0; i < characters.length; i++) {
                char c = characters[i];
                if ((c >= '0') && (c <= '9')) {
                    characters[i] = (char) (c + diff);
                }
            }

            digits = new String(characters);
        }

        int start = -1;
        int printed = digits.length();

        if (buffer instanceof CharSequence) {
            start = ((CharSequence) buffer).length();
        }

        buffer.append(digits);

        if (
            (start != -1)
            && (printed > 0)
            && (positions != null)
        ) {
            positions.add(new ElementPosition(this.element, start, start + printed));
        }

        return printed;

    }
644221
@Override
    public int print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        Set<ElementPosition> positions,
        boolean quickPath
    ) throws IOException {

        int start = -1;
        int printed = 0;

        if (buffer instanceof CharSequence) {
            start = ((CharSequence) buffer).length();
        }

        TZID tzid = null;
        ZonalOffset offset;

        if (formattable.hasTimezone()) {
            tzid = formattable.getTimezone();
        }

        if (tzid == null) {
            offset = getOffset(formattable, attributes);
        } else if (tzid instanceof ZonalOffset) {
            offset = (ZonalOffset) tzid;
        } else if (formattable instanceof UnixTime) {
            offset = Timezone.of(tzid).getOffset((UnixTime) formattable);
        } else {
            throw new IllegalArgumentException(
                "Cannot extract timezone offset from: " + formattable);
        }

        int total = offset.getIntegralAmount();
        int fraction = offset.getFractionalAmount();

        if ((total | fraction) == 0) {
            String zeroOffset = this.zeroOffsets.get(0);
            buffer.append(zeroOffset);
            printed = zeroOffset.length();
        } else {
            boolean negative = ((total < 0) || (fraction < 0));
            buffer.append(negative ? '-' : '+');
            printed++;

            int absValue = Math.abs(total);
            int h = absValue / 3600;
            int m = (absValue / 60) % 60;
            int s = absValue % 60;

            if (h < 10) {
                buffer.append('0');
                printed++;
            }

            String hours = String.valueOf(h);
            buffer.append(hours);
            printed += hours.length();

            if (
                (this.precision != SHORT)
                || (m != 0)
            ) {
                if (this.extended) {
                    buffer.append(':');
                    printed++;
                }

                if (m < 10) {
                    buffer.append('0');
                    printed++;
                }

                String minutes = String.valueOf(m);
                buffer.append(minutes);
                printed += minutes.length();

                if (
                    (this.precision != SHORT)
                    && (this.precision != MEDIUM)
                ) {
                    if ((this.precision == FULL) || ((s | fraction) != 0)) {
                        if (this.extended) {
                            buffer.append(':');
                            printed++;
                        }

                        if (s < 10) {
                            buffer.append('0');
                            printed++;
                        }

                        String seconds = String.valueOf(s);
                        buffer.append(seconds);
                        printed += seconds.length();

                        if (fraction != 0) {
                            buffer.append('.');
                            printed++;
                            String f = String.valueOf(Math.abs(fraction));
                            for (int i = 0, n = 9 - f.length(); i < n; i++) {
                                buffer.append('0');
                                printed++;
                            }
                            buffer.append(f);
                            printed += f.length();
                        }
                    }
                }
            }
        }

        if (
            (start != -1)
            && (printed > 0)
            && (positions != null)
        ) {
            positions.add(
                new ElementPosition(
                    TimezoneElement.TIMEZONE_ID,
                    start,
                    start + printed));
        }

        return printed;

    }
571290
public void writeHiddenDataStyles(final XMLUtil util, final Appendable appendable)
            throws IOException {
        for (final DataStyle dataStyle : this.dataStylesContainer
                .getValues(Dest.CONTENT_AUTOMATIC_STYLES)) {
            dataStyle.appendXMLContent(util, appendable);
        }
    }
117357
protected void printTotalPages(PdfTemplate template, float x, float y) throws VectorPrintException, InstantiationException, IllegalAccessException {
      if (getSettings().getBooleanProperty(Boolean.FALSE, ReportConstants.PRINTFOOTER)) {
         Phrase p = elementProducer.createElement(String.valueOf(lastPage), Phrase.class, stylerFactory.getStylers(PAGEFOOTERSTYLEKEY));
         ColumnText.showTextAligned(template, Element.ALIGN_LEFT, p, x, y, 0);
      }
   }
1306691
Set<ElementPosition> print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        boolean withPositions
    ) throws IOException {

        if (buffer == null) {
            throw new NullPointerException("Missing text result buffer.");
        }

        int index = 0;
        int len = this.steps.size();

        Set<ElementPosition> positions = null;
        boolean quickPath = (attributes == this.globalAttributes);

        if (withPositions) {
            positions = new LinkedHashSet<>(len);
        }

        if (this.hasOrMarkers) {
            Deque<StringBuilder> collectorStack = new LinkedList<>();
            StringBuilder buf = new StringBuilder(len << 2);
            collectorStack.push(buf);

            Deque<Set<ElementPosition>> positionStack = null;
            if (withPositions) {
                positionStack = new LinkedList<>();
                positionStack.push(positions);
            }

            int previous = 0;
            int current = 0;

            while (index < len) {
                FormatStep step = this.steps.get(index);
                current = step.getLevel();
                int level = current;

                // Start einer optionalen Sektion: Stack erweitern
                while (level > previous) {
                    StringBuilder sb = new StringBuilder();
                    sb.append(collectorStack.peek());
                    collectorStack.push(sb);
                    if (withPositions) {
                        positions = new LinkedHashSet<>();
                        positions.addAll(positionStack.peek());
                        positionStack.push(positions);
                    }
                    level--;
                }

                // Ende einer optionalen Sektion: Werte im Stack sichern
                while (level < previous) {
                    buf = collectorStack.pop();
                    collectorStack.pop();
                    collectorStack.push(buf);
                    if (withPositions) {
                        positions = positionStack.pop();
                        positionStack.pop();
                        positionStack.push(positions);
                    }
                    level++;
                }

                buf = collectorStack.peek();
                if (withPositions) {
                    positions = positionStack.peek();
                }

                RuntimeException re = null;
                int printed = -1;

                try {
                    printed = step.print(formattable, buf, attributes, positions, quickPath);
                } catch (ChronoException | IllegalArgumentException ex) {
                    re = ex;
                }

                if (printed == -1) {
                    // Fehlerfall: nächsten oder-Block suchen
                    int section = step.getSection();
                    int last = index;

                    if (!step.isNewOrBlockStarted()) {
                        for (int j = index + 1; j < len; j++) {
                            FormatStep test = this.steps.get(j);
                            if (test.isNewOrBlockStarted() && (test.getSection() == section)) {
                                last = j;
                                break;
                            }
                        }
                    }

                    if ((last > index) || step.isNewOrBlockStarted()) {
                        // wenn gefunden, zum nächsten oder-Block springen
                        collectorStack.pop();
                        StringBuilder sb = new StringBuilder();
                        if (!collectorStack.isEmpty()) {
                            sb.append(collectorStack.peek());
                        }
                        collectorStack.push(sb);
                        if (withPositions) {
                            positionStack.pop();
                            Set<ElementPosition> ep = new LinkedHashSet<>();
                            if (!positionStack.isEmpty()) {
                                ep.addAll(positionStack.peek());
                            }
                            positionStack.push(ep);
                        }
                        index = last;
                    } else if (re == null) {
                        throw new IllegalArgumentException("Not formattable: " + formattable);
                    } else {
                        throw new IllegalArgumentException("Not formattable: " + formattable, re);
                    }
                } else if (step.isNewOrBlockStarted()) {
                    index = step.skipTrailingOrBlocks();
                }

                // Schleifenzähler inkrementieren
                previous = current;
                index++;
            }

            // Verbleibende optionale Sektionen auflösen und Ergebnis schreiben
            buf = collectorStack.peek();
            collectorStack.clear();
            buffer.append(buf);

            if (withPositions) {
                positions = positionStack.peek();
                positionStack.clear();
            }
        } else {
            try {
                while (index < len) {
                    FormatStep step = this.steps.get(index);
                    step.print(formattable, buffer, attributes, positions, quickPath);

                    if (step.isNewOrBlockStarted()) {
                        index = step.skipTrailingOrBlocks();
                    }

                    index++;
                }
            } catch (ChronoException ex) {
                throw new IllegalArgumentException("Not formattable: " + formattable, ex);
            }
        }

        if (withPositions) {
            return Collections.unmodifiableSet(positions);
        } else {
            return null;
        }

    }
7150
private void updatePrintVisibility() {
		PrintablePage printablePage = printView.getPreviewPane()
				.getPrintablePage();

		if (printablePage.getViewType() == ViewType.DAY_VIEW) {
			printablePage.getDayView().refreshData();
		} else if (printablePage.getViewType() == ViewType.WEEK_VIEW) {
			printablePage.getWeekView().refreshData();
		}
	}
326554
public void appendXMLToAutomaticStyle(final XMLUtil util,
										  final Appendable appendable) throws IOException {
		appendable.append("<style:page-layout");
		util.appendEAttribute(appendable, "style:name", this.name);
		appendable.append("><style:page-layout-properties");
		util.appendAttribute(appendable, "fo:page-width", this.pageWidth.toString());
		util.appendAttribute(appendable, "fo:page-height", this.pageHeight.toString());
		util.appendEAttribute(appendable, "style:num-format", this.numFormat);
		util.appendAttribute(appendable, "style:writing-mode",
				this.writingMode.getAttrValue());
		util.appendAttribute(appendable, "style:print-orientation",
				this.printOrientation.getAttrValue());
		this.appendBackgroundColor(util, appendable);
		this.margins.appendXMLContent(util, appendable);
		appendable.append("/>"); // End of page-layout-properties

		PageSection
				.appendPageSectionStyleXMLToAutomaticStyle(this.header, util, appendable);
		PageSection
				.appendPageSectionStyleXMLToAutomaticStyle(this.footer, util, appendable);
		appendable.append("</style:page-layout>");
	}
1151389
public void printTo(StringBuilder buf, ReadablePartial partial) {
        try {
            printTo((Appendable) buf, partial);
        } catch (IOException ex) {
            // StringBuilder does not throw IOException
        }
    }
773436
public void writeMasterPageStyles(final XMLUtil util, final Appendable appendable)
            throws IOException {
        for (final MasterPageStyle ps : this.masterPageStylesContainer.getValues()) {
            ps.appendXMLToMasterStyle(util, appendable);
        }
    }
276534
public void appendNumberAttribute(final XMLUtil util, final Appendable appendable) throws IOException {
        this.appendMinIntegerDigitsAttribute(util, appendable);
        this.appendGroupingAttribute(util, appendable);
    }
1076235
@Override
    public int print(
        ChronoDisplay formattable,
        Appendable buffer,
        AttributeQuery attributes,
        Set<ElementPosition> positions, // optional
        boolean quickPath
    ) throws IOException {

        if (quickPath && this.optPrinter) {
            attributes = ChronoFormatter.class.cast(this.printer).getAttributes();
        }

        // special optimization avoiding double conversion from Moment to ZonalDateTime
        if (this.passThroughZDT && (formattable instanceof ZonalDateTime) && (positions == null)) {
            ChronoFormatter<?> cf = (ChronoFormatter<?>) this.printer;
            cf.print(formattable, buffer, attributes, false);
            return Integer.MAX_VALUE; // unknown number of printed characters
        }

        V value = formattable.get(this.element);
        StringBuilder collector = new StringBuilder();

        if ((positions != null) && (buffer instanceof CharSequence)) {
            int offset = ((CharSequence) buffer).length();

            if (this.printer instanceof ChronoFormatter) {
                ChronoFormatter<?> cf = ChronoFormatter.class.cast(this.printer);
                Set<ElementPosition> result = print(cf, value, collector, attributes);
                Set<ElementPosition> set = new LinkedHashSet<>();
                for (ElementPosition ep : result) {
                    set.add(
                        new ElementPosition(
                            ep.getElement(),
                            offset + ep.getStartIndex(),
                            offset + ep.getEndIndex()));
                }
                positions.addAll(set);
            } else {
                this.printer.print(value, collector, attributes);
            }

            positions.add(
                new ElementPosition(
                    this.element,
                    offset,
                    offset + collector.length()));
        } else {
            this.printer.print(value, collector, attributes);
        }

        buffer.append(collector);
        return collector.length();

    }