예제 #1
0
        public static DocTemplateVers.Domain.DTO.ServiceExport.DTO_Settings GetPageSettings(
            Rectangle pageSize,
            float marginLeft,
            float marginRight,
            float marginTop,
            float marginBottom) //Boolean showPageNumber,
        //PagePlacingMask
        //PagePlacingRange
        {
            DocTemplateVers.Domain.DTO.ServiceExport.DTO_Settings settings = ExportBaseHelper.GetDefaultPageSettings();//GetDefaultPageSettings();

            settings.MarginBottom = marginBottom;
            settings.MarginLeft   = marginLeft;
            settings.MarginRight  = marginRight;
            settings.MarginTop    = marginTop;
            //settings.ShowPageNumber = showPageNumber;
            settings.Height = pageSize.Height;
            settings.Width  = pageSize.Width;

            return(settings);
        }
예제 #2
0
        //adding -START-...
        private static iTS.Document InitializeDocument(ref DocTemplateVers.Domain.DTO.ServiceExport.DTO_Settings settings)
        {
            if (settings == null)
            {
                settings = ExportBaseHelper.GetDefaultPageSettings();
            }

            //settings.Size != DocTemplateVers.PageSize.none ||
            if (settings.Size != DocTemplateVers.PageSize.custom)
            {
                DocTemplateVers.Helpers.PageSizeValue PgSzV = DocTemplateVers.Helpers.Measure.GetSize(settings.Size, "px");
                settings.Width  = PgSzV.Width;
                settings.Height = PgSzV.Height;
            }

            if (settings.Width < lm.Comol.Core.DomainModel.DocTemplateVers.Helpers.Measure.cm_To_Px(5))
            {
                settings.Width = lm.Comol.Core.DomainModel.DocTemplateVers.Helpers.Measure.cm_To_Px(5);
            }
            if (settings.Height < lm.Comol.Core.DomainModel.DocTemplateVers.Helpers.Measure.cm_To_Px(5))
            {
                settings.Height = lm.Comol.Core.DomainModel.DocTemplateVers.Helpers.Measure.cm_To_Px(5);
            }

            if ((settings.MarginLeft + settings.MarginRight) > settings.Width)
            {
                settings.MarginLeft  = 0;
                settings.MarginRight = 0;
            }

            if ((settings.MarginTop + settings.MarginBottom) > settings.Height)
            {
                settings.MarginTop    = 0;
                settings.MarginBottom = 0;
            }


            return(new iTS.Document(new iTS.Rectangle(settings.Width, settings.Height), settings.MarginLeft, settings.MarginRight, settings.MarginTop, settings.MarginBottom));
        }
예제 #3
0
 public static DocTemplateVers.Domain.DTO.ServiceExport.DTO_Settings GetDefaultPageSettings()
 {
     return(ExportBaseHelper.GetDefaultPageSettings());
 }