Esempio n. 1
0
        private void SendLectioFile(string lectioWordFile, LectioDivinaWeek lectioWeek)
        {
            string fileName = CreateName(Properties.Settings.Default.OnJestLectioNameTemplate, lectioWeek);
            OnNotification("Wysyłam całość Lectio Divina jako "+fileName );
            string newName = System.IO.Path.Combine(tempPath, fileName);
            WordDocument word = new WordDocument();

            word.Open(lectioWordFile, false);

            word.SaveAsDifferentFormat(newName, WordFormats.Pdf);
            word.Close();

            onJestProxy.UploadFile(Properties.Settings.Default.OnJestUser, Properties.Settings.Default.OnJestPwd, newName);
        }
Esempio n. 2
0
        private void ExtractPictureFromShortContemplation()
        {
            // we will save the picture under the name from WeekPictureName
            // if it is ewmpty, we must create it

            if (String.IsNullOrEmpty(TitlePage.WeekPictureName))
                TitlePage.WeekPictureName = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(TitlePage.WeekShortContemplationName),
                                            "obrazek.jpg");
            Log("Biorê obrazek z "+ TitlePage.WeekShortContemplationName);
            Log("zapisujê jako "+TitlePage.WeekPictureName);

            WordDocument word = new WordDocument();
            word.Open(TitlePage.WeekShortContemplationName, false);
            word.ExtractImage(Properties.Settings.Default.ShortContemplationPictureNumber, TitlePage.WeekPictureName, ImageFormats.Jpg);
            word.Close();
        }