This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileInfo = new FileInfo("d:\\testfile.eml"); | |
var eml = MsgReader.Mime.Message.Load(fileInfo); | |
if (eml.Headers != null) | |
{ | |
if (eml.Headers.To != null) | |
{ | |
foreach (var recipient in eml.Headers.To) | |
{ | |
var to = recipient.Address; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var msg = new MsgReader.Outlook.Storage.Message("testfile.msg")) | |
{ | |
var from = msg.Sender; | |
var sentOn = msg.SentOn; | |
var recipientsTo = msg.GetEmailRecipients(MsgReader.Outlook.RecipientType.To, false, false); | |
var recipientsCc = msg.GetEmailRecipients(MsgReader.Outlook.RecipientType.Cc, false, false); | |
var subject = msg.Subject; | |
var htmlBody = msg.BodyHtml; | |
// etc... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuestPDF.Fluent; | |
using QuestPDF.Helpers; | |
using QuestPDF.Infrastructure; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a PDF document | |
Document.Create(document => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuestPDF.Fluent; | |
using QuestPDF.Helpers; | |
using QuestPDF.Infrastructure; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a PDF document | |
Document.Create(document => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuestPDF.Fluent; | |
using QuestPDF.Helpers; | |
using QuestPDF.Infrastructure; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a PDF document | |
Document.Create(document => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PdfSharp.Pdf; | |
using PdfSharp.Pdf.IO; | |
using PdfSharp.Drawing; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Load an existing PDF document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PdfSharp.Pdf; | |
using PdfSharp.Drawing; | |
PdfDocument document = new PdfDocument(); | |
PdfPage page = document.AddPage(); | |
XGraphics gfx = XGraphics.FromPdfPage(page); | |
XFont font = new XFont("Verdana", 12, XFontStyle.Regular); | |
int rows = 5; | |
int cols = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PdfSharp.Pdf; | |
using PdfSharp.Drawing; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a new PDF document | |
PdfDocument document = new PdfDocument(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PdfSharp.Pdf; | |
using PdfSharp.Drawing; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a new PDF document | |
PdfDocument document = new PdfDocument(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new document | |
XWPFDocument document = new XWPFDocument(); | |
// Create a new paragraph in the document | |
XWPFParagraph paragraph = document.createParagraph(); | |
XWPFRun run = paragraph.createRun(); | |
run.setText("Here is an image below:"); | |
// Insert an image | |
FileInputStream imageStream = new FileInputStream("path/to/your/image.jpg"); |
NewerOlder