Skip to content

Commit

Permalink
842094 : Update PDF "Getting Started" topic with screenshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sri-hari-haran-g committed Aug 11, 2023
1 parent b596e95 commit ad5c48b
Show file tree
Hide file tree
Showing 28 changed files with 28 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public IActionResult CreatePDFDocument()
//Assign data source.
pdfGrid.DataSource = dataTable;

//Apply built-in table style
pdfGrid.ApplyBuiltinStyle(PdfGridBuiltinStyle.GridTable4Accent1);

//Draw grid to the page of PDF document.
pdfGrid.Draw(page, new Syncfusion.Drawing.PointF(10, 10));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public IActionResult CreateDocument()
//Create PDF graphics for the page.
PdfGraphics graphics = page.Graphics;

string imagePath = _hostingEnvironment.WebRootPath + "/Data/Autumn Leaves.jpg";
string imagePath = _hostingEnvironment.WebRootPath + "/Data/Adventure Cycles.png";

//Get stream from the image file.
FileStream imageStream = new FileStream(imagePath, FileMode.Open, FileAccess.Read);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public ActionResult CreateDocument()
PdfGraphics graphics = page.Graphics;

//Load the image from the disk.
PdfBitmap image = new PdfBitmap(Server.MapPath("~/App_Data/Autumn Leaves.jpg"));
PdfBitmap image = new PdfBitmap(Server.MapPath("~/App_Data/Adventure Cycles.png"));

//Draw the image.
graphics.DrawImage(image, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public ActionResult CreateDocument()
//Assign data source.
pdfGrid.DataSource = dataTable;

//Apply built-in table style
pdfGrid.ApplyBuiltinStyle(PdfGridBuiltinStyle.GridTable4Accent1);

//Draw grid to the page of PDF document.
pdfGrid.Draw(page, new PointF(10, 10));

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected void GeneratePDF(object sender, EventArgs e)
PdfGraphics graphics = page.Graphics;

//Load the image from the disk.
PdfBitmap image = new PdfBitmap(Server.MapPath("~/App_Data/Autumn Leaves.jpg"));
PdfBitmap image = new PdfBitmap(Server.MapPath("~/App_Data/Adventure Cycles.png"));

//Draw the image.
graphics.DrawImage(image, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ protected void GeneratePDF(object sender, EventArgs e)
//Assign data source.
pdfGrid.DataSource = dataTable;

//Apply built-in table style
pdfGrid.ApplyBuiltinStyle(PdfGridBuiltinStyle.GridTable4Accent1);

//Draw grid to the page of PDF document.
pdfGrid.Draw(page, new PointF(10, 10));

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void Button_Click(object sender, RoutedEventArgs e)
PdfGraphics graphics = page.Graphics;

//Load the image as stream
Stream imageStream = typeof(MainPage).GetTypeInfo().Assembly.GetManifestResourceStream("Create_PDF_document_with_image.Assets.Autumn Leaves.jpg");
Stream imageStream = typeof(MainPage).GetTypeInfo().Assembly.GetManifestResourceStream("Create_PDF_document_with_image.Assets.Adventure Cycles.png");

//Load the image from the disk.
PdfBitmap image = new PdfBitmap(imageStream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ private void Button_Click(object sender, RoutedEventArgs e)
//Assign data source.
pdfGrid.DataSource = dataTable;

//Apply built-in table style
pdfGrid.ApplyBuiltinStyle(PdfGridBuiltinStyle.GridTable4Accent1);

//Draw grid to the page of PDF document.
pdfGrid.Draw(page, new PointF(10, 10));

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void GeneratePDF(object sender, RoutedEventArgs e)
PdfGraphics graphics = page.Graphics;

//Load the image from the disk.
PdfBitmap image = new PdfBitmap("../../Data/Autumn Leaves.jpg");
PdfBitmap image = new PdfBitmap("../../Data/Adventure Cycles.png");

//Draw the image
graphics.DrawImage(image, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ private void GeneratePDF(object sender, RoutedEventArgs e)
//Assign data source.
pdfGrid.DataSource = dataTable;

//Apply built-in table style
pdfGrid.ApplyBuiltinStyle(PdfGridBuiltinStyle.GridTable4Accent1);

//Draw grid to the page of PDF document.
pdfGrid.Draw(page, new PointF(10, 10));

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void GeneratePDF(object sender, EventArgs e)
PdfGraphics graphics = page.Graphics;

//Load the image from the disk.
PdfBitmap image = new PdfBitmap("../../Data/Autumn Leaves.jpg");
PdfBitmap image = new PdfBitmap("../../Data/Adventure Cycles.png");

//Draw the image
graphics.DrawImage(image, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ private void button1_Click(object sender, EventArgs e)
//Assign data source.
pdfGrid.DataSource = dataTable;

//Apply built-in table style
pdfGrid.ApplyBuiltinStyle(PdfGridBuiltinStyle.GridTable4Accent1);

//Draw grid to the page of PDF document.
pdfGrid.Draw(page, new PointF(10, 10));

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private void Button_Clicked(object sender, EventArgs e)
PdfGraphics graphics = page.Graphics;

//Load the image as stream
Stream imageStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("CreatePDFwithImage.Assets.Autumn Leaves.jpg");
Stream imageStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("CreatePDFwithImage.Assets.Adventure Cycles.png");

//Load the image from the disk.
PdfBitmap image = new PdfBitmap(imageStream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ void OnButtonClicked(object sender, EventArgs args)
//Assign data source.
pdfGrid.DataSource = dataTable;

//Apply built-in table style
pdfGrid.ApplyBuiltinStyle(PdfGridBuiltinStyle.GridTable4Accent1);

//Draw grid to the page of PDF document.
pdfGrid.Draw(page, new PointF(10, 10));

Expand Down

0 comments on commit ad5c48b

Please sign in to comment.