Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Megadurai
Copy link
Collaborator

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"
Copy link
Collaborator

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" />
Copy link
Collaborator

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)

Copy link
Collaborator

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
Copy link
Collaborator

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;

Copy link
Collaborator

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", "");
Copy link
Collaborator

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:\";
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants