MSG’i IMAGE’ye Dışa Aktarmak için C++ API

Microsoft Word veya Outlook gerektirmeden MSG’i C++ uygulaması içinde IMAGE’ye dönüştürün

 

Uygulamalarınıza e-posta dönüştürme özellikleri eklemek isteyen bir C++ geliştiricisi misiniz? Aspose.Msg for C++ kullanarak MSG dosya biçimini HTML’ye dönüştürebilirsiniz. Bundan sonra, Aspose.Words for C++ API’sini kullanarak HTML’yi IMAGE’ye aktarabilirsiniz. Her iki API de Aspose.Total for C++ paketi kapsamında gelir.

MSG'i IMAGE'ye Dönüştürmek için C++ API

  1. MailMessage sınıf referansını kullanarak MSG dosyasını açın
  2. Kaydet üye işlevini kullanarak MSG’i HTML’ye dönüştürün
  3. HTML’yi Document sınıfını kullanarak yükleyin
  4. Kaydet yöntemini kullanarak belgeyi IMAGE formatına kaydedin ve Image’yi SaveFormat olarak ayarlayın

Dönüşüm Gereksinimleri

Komut satırından nuget install Aspose.Total.Cpp``` veya Visual Studio Paket Yönetici Konsolu üzerinden ```Install-Package Aspose.Total.Cpp ile kurun.

Alternatif olarak, çevrimdışı MSI yükleyicisini veya DLL’leri downloads adresinden bir ZIP dosyasında alın.

// load the MSG file to be converted
System::SharedPtr<MailMessage> msg = MailMessage::Load(u"sourceFile.msg");
// save MSG as a HTML 
msg->Save(u"HtmlOutput.html", SaveOptions::get_DefaultHtml());  
// load HTML with an instance of Document
System::SharedPtr<Document> doc = System::MakeObject<Document>(u"HtmlOutput.html");
// call save method while passing Png as save format
doc->Save(u"convertedFile.Png");

E-POSTA Dosyasını C++ ile Ayrıştırma

Yalnızca MSG’inizi IMAGE’ye dönüştürmekle kalmaz, aynı zamanda MSG belgesini okuyabilir, değiştirebilir ve ayrıştırabilirsiniz. Aspose.Msg for C++ API’sinin MapiMessage sınıfını kullanarak e-postanın konu, adres, gövde, alıcı bilgilerini alabilirsiniz. Örneğin, get_SenderMsgAddress() özelliğini kullanarak dönüşüm için belirli bir gönderen e-postasını kontrol edebilirsiniz.

// create an instance of MapiMessage from file
System::SharedPtr<MapiMessage> msg = MapiMessage::FromFile(dataDir + L"message.msg");
// get subject
System::Console::WriteLine(System::String(L"Subject:") + msg->get_Subject());
// get from address
System::Console::WriteLine(System::String(L"From:") + msg->get_SenderMsgAddress());
// get body
System::Console::WriteLine(System::String(L"Body") + msg->get_Body());
// get recipients information
System::Console::WriteLine(System::String(L"Recipient: ") + msg->get_Recipients());

IMAGE Dosya Biçimi Düzenlemesini Kısıtlamak için C++ API

Belgeyi MSG’den IMAGE’ye aktarırken uygulamanıza belge koruma özellikleri de ekleyebilirsiniz. Belgenize koruma eklemek basit bir işlemdir, çünkü tek yapmanız gereken koruma yöntemini belgenize uygulamaktır. Kullanıcının belgeyi düzenlemesini kısıtlamak için koruma türünü Salt Okunur olarak ayarlayabilirsiniz.

// create a new document and protect it with a password.
auto doc = System::MakeObject<Document>();
// apply Document Protection.
doc->Protect(ProtectionType::ReadOnly, u"password");
// save the document.
doc->Save(u"DocumentProtection.PasswordProtection.Png");

C++ ile MSG Dönüşüm Seçeneklerini Keşfedin

MSG s'yi BMP 'ye dönüştürün (Bit Eşlem Görüntü Dosyası)
MSG s'yi DOC 'ye dönüştürün (Microsoft Word İkili Biçimi)
MSG s'yi DOCM 'ye dönüştürün (Microsoft Word 2007 Marco Dosyası)
MSG s'yi DOCX 'ye dönüştürün (Office 2007+ Word Belgesi)
MSG s'yi DOT 'ye dönüştürün (Microsoft Word Şablon Dosyaları)
MSG s'yi DOTM 'ye dönüştürün (Microsoft Word 2007+ Şablon Dosyası)
MSG s'yi DOTX 'ye dönüştürün (Microsoft Word Şablon Dosyası)
MSG s'yi EMF 'ye dönüştürün (Gelişmiş Meta Dosya Biçimi)
MSG s'yi EPUB 'ye dönüştürün (eKitap Dosyasını Aç)
MSG s'yi FLATOPC 'ye dönüştürün (Microsoft Word 2003 Kelime İşleme ML)
MSG s'yi GIF 'ye dönüştürün (Grafik Değişim Formatı)
MSG s'yi PNG 'ye dönüştürün (Taşınabilir Ağ Grafiği)
MSG s'yi JPEG 'ye dönüştürün (Ortak Fotoğraf Uzman Grubu)
MSG s'yi ODT 'ye dönüştürün (OpenDocument Metin Dosyası Biçimi)
MSG s'yi OTT 'ye dönüştürün (OpenDocument Şablonu)
MSG s'yi PCL 'ye dönüştürün (Yazıcı Komut Dili)
MSG s'yi PDF 'ye dönüştürün (Taşınabilir Döküman Formatı)
MSG s'yi PNG 'ye dönüştürün (Taşınabilir Ağ Grafiği)
MSG s'yi PS 'ye dönüştürün (PostScript Dosyası)
MSG s'yi RTF 'ye dönüştürün (Zengin metin formatı)
MSG s'yi SVG 'ye dönüştürün (Skaler Vektör Grafikleri)
MSG s'yi TIFF 'ye dönüştürün (Etiketli Görüntü Dosyası Formatı)
MSG s'yi DOCX 'ye dönüştürün (Office 2007+ Word Belgesi)
MSG s'yi WORDML 'ye dönüştürün (Microsoft Word 2003 Kelime İşleme ML)
MSG s'yi XPS 'ye dönüştürün (XML Kağıt Özellikleri)
MSG s'yi BMP 'ye dönüştürün (Bit Eşlem Görüntü Dosyası)
MSG s'yi DOC 'ye dönüştürün (Microsoft Word İkili Biçimi)
MSG s'yi DOCM 'ye dönüştürün (Microsoft Word 2007 Marco Dosyası)
MSG s'yi DOCX 'ye dönüştürün (Office 2007+ Word Belgesi)
MSG s'yi DOT 'ye dönüştürün (Microsoft Word Şablon Dosyaları)
MSG s'yi DOTM 'ye dönüştürün (Microsoft Word 2007+ Şablon Dosyası)
MSG s'yi DOTX 'ye dönüştürün (Microsoft Word Şablon Dosyası)
MSG s'yi EMF 'ye dönüştürün (Gelişmiş Meta Dosya Biçimi)
MSG s'yi EPUB 'ye dönüştürün (eKitap Dosyasını Aç)
MSG s'yi FLATOPC 'ye dönüştürün (Microsoft Word 2003 Kelime İşleme ML)
MSG s'yi GIF 'ye dönüştürün (Grafik Değişim Formatı)
MSG s'yi JPEG 'ye dönüştürün (Ortak Fotoğraf Uzman Grubu)