예제 #1
0
        /// <summary>
        /// Builds a <see cref="Label" /> from a continous media source with cutter enabled.
        /// If the <see cref="MediaType"/> parameter remains null, the related ZPL command will be omitted.
        /// </summary>
        /// <param name="printWidth">Print width of the label</param>
        /// <param name="labelLength">Total length of a single label</param>
        /// <param name="groupCutCount">Print n labels and then enable the cutter.</param>
        /// <param name="mediaType">Type of the printed medium</param>
        /// <returns>Returns a fresh <see cref="LabelBuilder" /> instance.</returns>
        public static LabelBuilder FromCuttedContinuousMedia(int printWidth, int labelLength, int groupCutCount = 0, MediaType?mediaType = null)
        {
            var preset = new ContinuousPreset(printWidth, labelLength, PrintMode.Cutter, groupCutCount, mediaType);

            return(new LabelBuilder(preset));
        }
예제 #2
0
        /// <summary>
        /// Builds a <see cref="Label" /> from a continous media source.
        /// If the <see cref="PrintMode"/> or <see cref="MediaType"/> parameter remains null, the related ZPL commands will be omitted.
        /// </summary>
        /// <param name="printWidth">Print width of the label</param>
        /// <param name="labelLength">Total length of a single label</param>
        /// <param name="printMode">How the printer behaves after a label or labelgroup was printed</param>
        /// <param name="mediaType">Type of the printed medium</param>
        /// <returns>Returns a fresh <see cref="LabelBuilder" /> instance.</returns>
        public static LabelBuilder FromContinuousMedia(int printWidth, int labelLength, PrintMode?printMode = null, MediaType?mediaType = null)
        {
            var preset = new ContinuousPreset(printWidth, labelLength, printMode, 0, mediaType);

            return(new LabelBuilder(preset));
        }