init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
31
Kreta.BusinessLogic/Helpers/AsposeStaticHelper.cs
Normal file
31
Kreta.BusinessLogic/Helpers/AsposeStaticHelper.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Kreta.BusinessLogic.Classes;
|
||||
using Kreta.BusinessLogic.HelperClasses.AmiTorzslapCOs;
|
||||
using Kreta.Core;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
using AsposeWords = Aspose.Words;
|
||||
|
||||
namespace Kreta.BusinessLogic.Helpers
|
||||
{
|
||||
public partial class AsposeHelper
|
||||
{
|
||||
public MemoryStream GetStaticDocument(Stream sablonStream, int formatumId)
|
||||
{
|
||||
var resultDoc = new AsposeWords.Document(sablonStream);
|
||||
AsposeWords.Style normal = resultDoc.Styles[AsposeWords.StyleIdentifier.Normal];
|
||||
normal.Font.Name = AmiTorzslapResource.UsedFontName;
|
||||
normal.Font.Size = AmiTorzslapConstants.UsedFontSize;
|
||||
var ms = new MemoryStream();
|
||||
resultDoc.Save(ms, formatumId == (int)NyomtatvanyFormatumEnum.Word ? AsposeWords.SaveFormat.Docx : AsposeWords.SaveFormat.Pdf);
|
||||
ms.Position = 0;
|
||||
return ms;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue