I used RadGrid Export to Pdf and open the PDF file,but need the password,why?
code:
protected void ToPdf_Click(object sender, ImageClickEventArgs e)
{
gvStudent.PageSize = 50;
gvStudent.ExportSettings.IgnorePaging = true;
gvStudent.ExportSettings.OpenInNewWindow = true;
gvStudent.MasterTableView.ExportToPdf();
}
code:
protected void ToPdf_Click(object sender, ImageClickEventArgs e)
{
gvStudent.PageSize = 50;
gvStudent.ExportSettings.IgnorePaging = true;
gvStudent.ExportSettings.OpenInNewWindow = true;
gvStudent.MasterTableView.ExportToPdf();
}
6 Answers, 1 is accepted
0
Hello Bob,
This problem is addressed in RadControls for ASP.NET AJAX Q1 2010 SP1.
Let me know if you need more information.
Best regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
This problem is addressed in RadControls for ASP.NET AJAX Q1 2010 SP1.
Let me know if you need more information.
Best regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ugur
Top achievements
Rank 1
answered on 26 Jan 2011, 09:24 AM
Hi,
I have same issue. After created pdf, it asks for password although I didn't set any property related with password.
I have 2010.3.1317.35 version of Telerik.Web.UI.dll installed (last updated). I want to save pdf in a directory and send it with mail without showing it.
Please help !
I have same issue. After created pdf, it asks for password although I didn't set any property related with password.
I have 2010.3.1317.35 version of Telerik.Web.UI.dll installed (last updated). I want to save pdf in a directory and send it with mail without showing it.
Please help !
protected
void grdResult_GridExporting(object source, GridExportingArgs e)
{
if (File.Exists(path))
{
File.Delete(path);
}
using (FileStream fs = File.Create(path))
{
Byte[] info = System.Text.Encoding.Default.GetBytes(e.ExportOutput);
fs.Write(info, 0, info.Length);
}
Response.Redirect("~/Default.aspx"); }
0
Hello Ugur,
The Default encoding is the root cause for this issue. Try the following:
Regards,
Daniel
the Telerik team
The Default encoding is the root cause for this issue. Try the following:
Encoding.GetEncoding(1252).GetBytes(...
Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ugur
Top achievements
Rank 1
answered on 26 Jan 2011, 10:40 AM
Thanks,
it works..
it works..
0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 01 Feb 2016, 08:31 AM
HI
Encoding.GetEncoding(1252) is works for none-DBCS only.
Consider the DBCS too Okay.
So, How to resolve the DBCS, Encoding.GetEncoding(950), etc. the exported pdf still password protected.
Best regards.
Chris
0
Hello Chris,
The problem is most probably a broken header of the PDF file which may be caused by different factors. For example:
- postback compression in IIS or RadCompression
- changes to the binary array
- SSL + Internet Explorer
To get better assistance, please let us know what are your browser/version and share the corresponding code so that we can examine it.
I have attached a simple website (add a web.config and binary files to run it) which you could test at your side. The first button saves the output to the file then sends the file to the browser. The second one sends the output directly to the browser. RadGrid is bound to a simple DataTable with multi-byte character text (japanese and chinese) for testing purposes.
Regards,
Daniel
Telerik
The problem is most probably a broken header of the PDF file which may be caused by different factors. For example:
- postback compression in IIS or RadCompression
- changes to the binary array
- SSL + Internet Explorer
To get better assistance, please let us know what are your browser/version and share the corresponding code so that we can examine it.
I have attached a simple website (add a web.config and binary files to run it) which you could test at your side. The first button saves the output to the file then sends the file to the browser. The second one sends the output directly to the browser. RadGrid is bound to a simple DataTable with multi-byte character text (japanese and chinese) for testing purposes.
Regards,
Daniel
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items