Error when printing to PDF

35 posts, 0 answers
  1. Mitchell
    Mitchell avatar
    24 posts
    Member since:
    Nov 2010

    Posted 06 Sep 2011 Link to this post

    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)
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 Sep 2011 Link to this post

    Hello Mitchell,

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

    Thanks,
    Princy.
  3. Mitchell
    Mitchell avatar
    24 posts
    Member since:
    Nov 2010

    Posted 07 Sep 2011 Link to this post

    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?
  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 07 Sep 2011 Link to this post

    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 >>

  5. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 08 Sep 2011 Link to this post

    The demo online is working, but after download into local machine, the demo did not working.
    We got same error as above.
  6. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 09 Sep 2011 Link to this post

    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 >>

  7. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 12 Sep 2011 Link to this post

    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

  8. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 14 Sep 2011 Link to this post

    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
  9. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 21 Sep 2011 Link to this post

    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
  10. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 21 Sep 2011 Link to this post

    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)

  11. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 27 Sep 2011 Link to this post

    Hey Tony were you able to fix the problem? I am getting the same errors and hot fix does not seem to work.
  12. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 27 Sep 2011 Link to this post

    Sorry, no answer for this yet. I am focus on other part now and disable the print function for now.
  13. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 28 Sep 2011 Link to this post

    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
  14. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 28 Sep 2011 Link to this post

    Our web box is on IIS 7.5
  15. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 28 Sep 2011 Link to this post

    We use Visual Studio 2010, under window 7
  16. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 29 Sep 2011 Link to this post

    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
  17. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 29 Sep 2011 Link to this post

    Hi there
    I use VS 2010 build in web server.

  18. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 03 Oct 2011 Link to this post

    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
  19. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 03 Oct 2011 Link to this post

    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?
  20. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 03 Oct 2011 Link to this post

    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.
  21. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 04 Oct 2011 Link to this post

    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
  22. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 04 Oct 2011 Link to this post

    You can find an example of our project attached to ticket #455364. Let me know if this is sufficient. Thanks
  23. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 04 Oct 2011 Link to this post

    Please go
    http://gp2.guideproductions.net/TelerikPrint.zip to download the zip file.
    I use DefaultCS.aspx for testing
  24. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 11 Oct 2011 Link to this post

    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
  25. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 11 Oct 2011 Link to this post

    Simon,

    Yes it was closed but it should have our sample code attached which you can use for your testing.
  26. tony
    tony avatar
    13 posts
    Member since:
    Jun 2011

    Posted 11 Oct 2011 Link to this post

    You can get the code in TelerikCode@hotmail.ca
    The password: SchedulerPrint
  27. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 12 Oct 2011 Link to this post

    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
  28. Aaron
    Aaron avatar
    1 posts
    Member since:
    Jul 2012

    Posted 28 Oct 2011 Link to this post

    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.
  29. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 31 Oct 2011 Link to this post

    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
  30. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 14 Feb 2012 Link to this post

    Hi Aaron, any news on this? Its been 4 months and latest version of controls still produces this error.
Back to Top