Last active
August 29, 2015 14:00
-
-
Save maman/f6d562472f751a68b0e6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
namespace ReportSamples { | |
class HelloWorld { | |
public static void Main() { | |
Document document = new Document(); | |
PdfWriter.GetInstance(document, new FileStream("HelloWorld.pdf", FileMode.Create)); | |
document.Open(); | |
document.Add(new Paragraph("Hello World!")); | |
document.Close(); | |
System.Diagnostics.Process.Start("HelloWorld.pdf"); | |
} | |
} | |
} |
This file contains hidden or 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
namespace ReportSamples { | |
class HelloWorld { | |
public static void Main() { | |
Report report = new Report(new PdfFormatter()); | |
FontDef fd = new FontDef(report, "Helvetica"); | |
FontProp fp = new FontPropMM(fd, 25); | |
Page page = new Page(report); | |
page.AddCenteredMM(80, new RepString(fp, "Hello World!")); | |
RT.ViewPDF(report, "HelloWorld.pdf"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment