-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sample(REPORT-355825): WPF sample to add digital signature #3
base: master
Are you sure you want to change the base?
Conversation
Megadurai
commented
Apr 29, 2024
Description: | Added WPF sample to add digital signature in PDF. |
Analysis: | NA |
Reason for not identifying earlier: | NA |
Is it a breaking issue? | No |
Solution description: | Added WPF Viewer sample to add digital signature in PDF. |
Areas affected and ensured: | NA |
Test cases: | NA |
Tested sample location: | NA |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:syncfusion="clr-namespace:BoldReports.UI.Xaml;assembly=BoldReports.Wpf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xmlns:BoldReports="clr-namespace:BoldReports.UI.Xaml;assembly=BoldReports.Wpf"
mc:Ignorable="d" | ||
Title="MainWindow" Height="450" Width="800"> | ||
<Grid> | ||
<syncfusion:ReportViewer Name="reportViewer" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<syncfusion:Boldreports: Name="reportViewer" />
} | ||
|
||
private void MainWindow_Loaded(object sender, RoutedEventArgs e) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the space
|
||
private void ReportViewer_ReportExport(object sender, BoldReports.Windows.ReportExportEventArgs e) | ||
{ | ||
//Get report path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cancel the default export
// Set up report writer | ||
ReportWriter reportWriter = new ReportWriter(reportPath); | ||
reportWriter.ReportProcessingMode = ProcessingMode.Remote; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the parameter case also
PdfGraphics graphics = page.Graphics; | ||
|
||
// Replace "bin\Debug" with an empty string | ||
string projectDirectory = Environment.CurrentDirectory.Replace(@"\bin\Debug", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use common file path location
// Convert the stream to byte array | ||
byte[] byteArray = stream1.ToArray(); | ||
// Specify the file path for saving the PDF | ||
string pdffilepath = @"D:\"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the output to within application