Esempio n. 1
0
 public static void DOCXToPDF(string CevrilecekDosyaAdresi, string SonucDosyaAdresi)
 {
     Aspose.Words.LoadOptions loadOptions = new Aspose.Words.LoadOptions();
         loadOptions.LoadFormat = Aspose.Words.LoadFormat.Docx;
         Document docx = new Document(CevrilecekDosyaAdresi, loadOptions);
         docx.Save(SonucDosyaAdresi);
 }
Esempio n. 2
0
    public static void DOCXToPDF(string CevrilecekDosyaAdresi, string SonucDosyaAdresi)
    {
        Aspose.Words.LoadOptions loadOptions = new Aspose.Words.LoadOptions();
        loadOptions.LoadFormat = Aspose.Words.LoadFormat.Docx;
        Document docx = new Document(CevrilecekDosyaAdresi, loadOptions);

        docx.Save(SonucDosyaAdresi);
    }
Esempio n. 3
0
    public static void TXTToPDF(string CevrilecekDosyaAdresi, string SonucDosyaAdresi)
    {
        Aspose.Words.LoadOptions loadOptions = new Aspose.Words.LoadOptions();
        loadOptions.LoadFormat = Aspose.Words.LoadFormat.Text;
        Document text = new Document(CevrilecekDosyaAdresi, loadOptions);

        text.Save(SonucDosyaAdresi);
    }
Esempio n. 4
0
 public WordHelper(Stream stream, AW.LoadOptions loadOptions = null)
 {
     if (wDoc == null)
     {
         wDoc = loadOptions == null ? new AW.Document(stream) : new AW.Document(stream, loadOptions);
     }
     if (wDoc != null && wDocBuilder == null)
     {
         wDocBuilder = new AW.DocumentBuilder(wDoc);
     }
 }
Esempio n. 5
0
 public WordHelper(string fileName, AW.LoadOptions loadOptions = null)
 {
     if (wDoc == null)
     {
         wDoc = loadOptions == null ? new AW.Document(fileName) : new AW.Document(fileName, loadOptions);
     }
     if (wDoc != null && wDocBuilder == null)
     {
         wDocBuilder = new AW.DocumentBuilder(wDoc);
     }
 }
        public static void Run()
        {
            // ExStart:SaveEmailAsPDF
            // The path to the File directory
            string       dataDir = RunExamples.GetDataDir_KnowledgeBase();
            MailMessage  mailMsg = MailMessage.Load(dataDir + "message3.msg");
            MemoryStream ms      = new MemoryStream();

            mailMsg.Save(ms, Aspose.Email.SaveOptions.DefaultMhtml);

            // create an instance of LoadOptions and set the LoadFormat to Mhtml
            var loadOptions = new Aspose.Words.LoadOptions();

            loadOptions.LoadFormat = LoadFormat.Mhtml;

            // create an instance of Document and load the MTHML from MemoryStream
            var document = new Aspose.Words.Document(ms, loadOptions);

            // create an instance of HtmlSaveOptions and set the SaveFormat to Html
            var saveOptions = new Aspose.Words.Saving.PdfSaveOptions();

            document.Save(dataDir + "SaveEmailAsPDF_out.pdf", saveOptions);
            // ExEnd:SaveEmailAsPDF
        }
Esempio n. 7
0
 public static void TXTToPDF(string CevrilecekDosyaAdresi, string SonucDosyaAdresi)
 {
     Aspose.Words.LoadOptions loadOptions = new Aspose.Words.LoadOptions();
         loadOptions.LoadFormat = Aspose.Words.LoadFormat.Text;
         Document text = new Document(CevrilecekDosyaAdresi, loadOptions);
         text.Save(SonucDosyaAdresi);
 }