This is a migrated thread and some comments may be shown as answers.

Error when printing to PDF

34 Answers 300 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mitchell
Top achievements
Rank 1
Mitchell asked on 06 Sep 2011, 11:11 PM
When I call the ExportToPdf() function for my scheduler widget, I get the following error. Anyone aware of what that could be?

System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Stream stream)
at Telerik.Web.Apoc.Image.ApocImage..ctor(String href, Byte[] imageData)
at Telerik.Web.Apoc.Image.ApocImageFactory.Make(String href)
at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.SystemException: System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Stream stream)
at Telerik.Web.Apoc.Image.ApocImage..ctor(String href, Byte[] imageData)
at Telerik.Web.Apoc.Image.ApocImageFactory.Make(String href)
at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

34 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Sep 2011, 05:22 AM
Hello Mitchell,

Check the following demo which implements the similar scenario.
Scheduler / Pdf Export.

Thanks,
Princy.
0
Mitchell
Top achievements
Rank 1
answered on 07 Sep 2011, 01:43 PM
That's how I'm implementing it. I'm not doing anything out of the ordinary with it.

Any other thoughts on the error? Telerik staff? Anyone?
0
Peter
Telerik team
answered on 07 Sep 2011, 03:01 PM
Hi Mitchell,

What version do you use? The online demo does not have this problem. Can you isolate the issue in a sample project and send it to us for testing?


Kind regards, Peter
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
tony
Top achievements
Rank 1
answered on 09 Sep 2011, 01:38 AM
The demo online is working, but after download into local machine, the demo did not working.
We got same error as above.
0
Helen
Telerik team
answered on 09 Sep 2011, 12:08 PM
Hello Tony,

Could you please send us more details about the exact your configuration - OS, browser version etc?
Did you run the examples through the IIS or Cassini server?

Regards,
Helen
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
tony
Top achievements
Rank 1
answered on 12 Sep 2011, 10:13 PM
First, we use Ajax Q2 2011 version.Operation system is Window 7, we use Visual Studio 2010, Browser IE 9 and FF 6.02.
When we run StartExamples, print function works.
What we use VS 2010 Create page named DefaultCS.aspx with DataSource, and at code behind, we add

protected void radButton_Click(object sender, EventArgs e)

{

rsScheduler.ExportToPdf();

}

 

protected void Page_PreRender(object sender, EventArgs e)

{

rsScheduler.Skin =

 

"Default";

}



After click the button, we got error
Invalid URI: The Authority/Host could not be parsed

0
Peter
Telerik team
answered on 14 Sep 2011, 10:58 AM
Hi Tony,

This is a known issue which we will try to resolve as soon as possible.

Please, accept our apologies for the caused inconvenience.

Best wishes,
Peter
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
Peter
Telerik team
answered on 21 Sep 2011, 05:04 PM
Hello Tony,

I am glad to let you know that we managed to fix this problem (or at least so we think). Please, try the latest internal build and let us know if everything works well in your project. In case you don't have access to the latest build, you can download the hotfix from here.

Regards, Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
tony
Top achievements
Rank 1
answered on 21 Sep 2011, 06:36 PM
Hi
After I reference new dll from hot fix, and click export button, I got new error

Server Error in '/' Application.

System.SystemException: Error while creating area : Encountered web exception while fetching image from file:///C:/Users/tdong/documents/visual studio 2010/Projects/SchedulePrint/SchedulePrint/Telerik.Web.UI.WebResource.axd%3Fimgid=37b58abc935a46578b7a783a1bc5e62a&type=rbi: Illegal characters in path.
at Telerik.Web.Apoc.ApocDriver.FireApocError(String message)
at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.SystemException: System.SystemException: Error while creating area : Encountered web exception while fetching image from file:///C:/Users/tdong/documents/visual studio 2010/Projects/SchedulePrint/SchedulePrint/Telerik.Web.UI.WebResource.axd%3Fimgid=37b58abc935a46578b7a783a1bc5e62a&type=rbi: Illegal characters in path.
at Telerik.Web.Apoc.ApocDriver.FireApocError(String message)
at Telerik.Web.Apoc.Fo.Flow.ExternalGraphic.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region)
at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area)
at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree)
at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence)
at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement()
at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)

0
Ilya
Top achievements
Rank 1
answered on 27 Sep 2011, 09:44 PM
Hey Tony were you able to fix the problem? I am getting the same errors and hot fix does not seem to work.
0
tony
Top achievements
Rank 1
answered on 27 Sep 2011, 10:02 PM
Sorry, no answer for this yet. I am focus on other part now and disable the print function for now.
0
Simon
Telerik team
answered on 28 Sep 2011, 03:24 PM
Hi guys,

We currently are unable to reproduce this on our side in the standard IIS Express setup. There definitely must be something different on your ends that serves as a trigger for the exception.

So, we would like to ask you to provide us with samples (through support tickets) that we can run locally and test. Additionally, which are the versions of IIS Express, which you are using?

Kind regards,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Ilya
Top achievements
Rank 1
answered on 28 Sep 2011, 03:41 PM
Our web box is on IIS 7.5
0
tony
Top achievements
Rank 1
answered on 28 Sep 2011, 09:57 PM
We use Visual Studio 2010, under window 7
0
Simon
Telerik team
answered on 29 Sep 2011, 10:45 AM
Hello guys,

It is very important for us to know whether you are using IIS Express or not.

@tony Are you using the VS 2010 built-in web server (aka Cassini), IIS or IIS Express?

Please provide us with this specific piece of info as it will greatly improve our discovery/testing process.

Kind regards,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
tony
Top achievements
Rank 1
answered on 29 Sep 2011, 08:31 PM
Hi there
I use VS 2010 build in web server.

0
Simon
Telerik team
answered on 03 Oct 2011, 11:30 AM
Hello Tony,

Thank you for this info.

The problems we have found and fixed so far with the PDF export functionality were manifesting in IIS Express. We still cannot reproduce the exceptions reported in this thread under IIS Express, IIS and VS built-in web server.

We will be continuing our tests with the hope of catching the problem and any info you may give us about your environments and setups will only help us, so please let us know if you find something.

Regards,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Ilya
Top achievements
Rank 1
answered on 03 Oct 2011, 03:25 PM
Simon,

Here is our configuration:

Local: VS 2010 SP1 on Windows 7 64bit
Web Server: Windows 2008 R2 Standard SP1 64bit, IIS 7.5,.NET 4 in Integrated mode

Could it be that it is having problems running in 64bit environment?
0
tony
Top achievements
Rank 1
answered on 03 Oct 2011, 08:53 PM
Window 7 professional, 64 bit Operation System
Visual Studio 2010 Professional 10.0.40219.1 SP1 Rel
IIS 7.5
User account is in administor group
Tested both IIS 7.5 and VS 2010 and got same error.
0
Simon
Telerik team
answered on 04 Oct 2011, 11:43 AM
Hello tony,

We were testing in the meanwhile the same setups without success.

At this point only a sample project has the potential to help us track down this bug. Please consider providing us with such. If you are unable to send it to us via a support ticket, you can upload the project to a file hosting service and put a link to it here.

Thank you in advance for your understanding and cooperation.

Kind regards,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Ilya
Top achievements
Rank 1
answered on 04 Oct 2011, 03:54 PM
You can find an example of our project attached to ticket #455364. Let me know if this is sufficient. Thanks
0
tony
Top achievements
Rank 1
answered on 04 Oct 2011, 07:06 PM
Please go
http://gp2.guideproductions.net/TelerikPrint.zip to download the zip file.
I use DefaultCS.aspx for testing
0
Simon
Telerik team
answered on 11 Oct 2011, 01:28 PM
Hi again,

@Ilya It seems that the problem in the referenced support ticket has been resolved and it has been a different problem.

@tony I cannot load the URL as if your web site is not publicly accessible. Could you please look into that?

Regards,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Ilya
Top achievements
Rank 1
answered on 11 Oct 2011, 09:41 PM
Simon,

Yes it was closed but it should have our sample code attached which you can use for your testing.
0
tony
Top achievements
Rank 1
answered on 11 Oct 2011, 10:47 PM
You can get the code in TelerikCode@hotmail.ca
The password: SchedulerPrint
0
Simon
Telerik team
answered on 12 Oct 2011, 04:07 PM
Hello Ilya and tony,

Thank you for the sample projects.

We will be testing them in different environments and with different data extensively for the next few weeks, hopefully isolating the different problems and fixing them.

We will provide more info as we have concrete results.

All the best,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Aaron
Top achievements
Rank 1
answered on 28 Oct 2011, 02:56 PM
Did you guys make any headway with this issue?  I'm having the same issue as the original post.  Just downloaded the code yesterday.  Really need this up and running for a client, any help would be greatly appreciated.
0
Simon
Telerik team
answered on 31 Oct 2011, 01:12 PM
Hello Aaron,

No, we still have not made any progress. We cannot reproduce the problem on our side, hence we cannot debug it.

Could you please provide us with more information as:
  • The version of the web server;
  • The version of your OS;
  • Do you reproduce the problem when exporting with the 'Simple' skin?

Greetings,
Simon
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Ilya
Top achievements
Rank 1
answered on 14 Feb 2012, 06:54 PM
Hi Aaron, any news on this? Its been 4 months and latest version of controls still produces this error.
0
Simon
Telerik team
answered on 15 Feb 2012, 01:49 PM
Hello,

We've managed to fix most of the problems with the export functionality, however, some of them that depend on external factors, which we cannot fix in RadScheduler, remained. Here is a list with all such known problems and their resolutions.

If you still cannot resolve the error, please open a support ticket and give specific information about your OS, Web Server and provide markup or a sample project.

All the best,
Simon
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Ilya
Top achievements
Rank 1
answered on 15 Feb 2012, 05:32 PM
Simon,

The solution on your website read this: "1. This problem appears on export when the Telerik.Web.UI .dll is referenced trough the GAC and the assembly version is different from the WebResource.axd version registered in the web.config file. Please check you web.config for proper handler registration in the following section: ".

I checked GAC and it does not look like Telerik is registered at all. Maybe I am missing something. Please let me know what should be done to correct this error. Thanks
0
Helen
Telerik team
answered on 16 Feb 2012, 06:24 PM
Hi Ilya,

This is one of the possible causes for this issue.
Do you use IIS or Cassini when you reproduce the issue? If you are using IIS - what is the exact version?
Do you have "Telerik.Web.UI.WebResource.axd" handler registration in the web.config file?

Are you using RadScriptManager? If not - could you please replace your asp:ScriptManager with it and register the mentioned above handler in the web.config file trough it's smart tag?

It will be helpful if you open a support ticket and send us a sample project, which demonstrates the issue to examine it locally.

Kind regards,
Helen
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Ilya
Top achievements
Rank 1
answered on 16 Feb 2012, 06:49 PM
Hi Helen,

We are IIS 7.5. Below is the web.config line referencing WebResource

<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />

And we do use RadScriptManager

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Services>
                <asp:ServiceReference Path="~/Appointment.asmx" />
            </Services>
</telerik:RadScriptManager>

Thanks
Ilya
0
Helen
Telerik team
answered on 20 Feb 2012, 05:34 PM
Hi Ilya,

Please find attached a project, which works at our side under .net 2.0 Classic and Integrated pools of IIS 7.5.
Does it work at your side?

Greetings,
Helen
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Scheduler
Asked by
Mitchell
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mitchell
Top achievements
Rank 1
Peter
Telerik team
tony
Top achievements
Rank 1
Helen
Telerik team
Ilya
Top achievements
Rank 1
Simon
Telerik team
Aaron
Top achievements
Rank 1
Share this question
or