Welcome Guest Search | Active Topics | Sign In | Register

ASPX RenderAsPDF() not working for JQuery (JQPlot) Options
binarybrain
Posted: Friday, June 22, 2012 4:34:52 PM
Rank: Newbie
Groups: Member

Joined: 6/22/2012
Posts: 3
I have the following in the code behind of my aspx page

Code: Visual Basic.NET
Dim JS As New System.Text.StringBuilder
            With JS
                .Length = 0
                .AppendLine("$(document).ready(function() { ")
                .AppendLine("var line1 = [" & firstline.ToString & "];")
                .AppendLine("var line2 = [" & secondline.ToString & "];")
                .AppendLine("$.jqplot('chart1', [line1, line2], ")
                .AppendLine("{")
                .AppendLine("axesDefaults: { tickRenderer: $.jqplot.CanvasAxisTickRenderer, pad: 1.5 } ,")
                .AppendLine("axes: { xaxis: { renderer: $.jqplot.DateAxisRenderer, tickOptions: { angle: -30, formatString: '%b %Y' }},")
                .AppendLine("yaxis:{ tickOptions:{ formatString:" & sConvertToCurrency & "}}},")
                .AppendLine("highlighter: { show: true, sizeAdjust: 20, fadeTooltip: true, tooltipLocation:'se'},")
                .AppendLine("grid: { background: 'white', drawGridLines: false },")
                .AppendLine("seriesColors: ['green', 'red'] }")
                .AppendLine(");")
                .AppendLine("});")
            End With

       

            JSHelper.RegisterCustomScript("PlotsJS", Me.Page, JS.ToString)


When clicking my Button I get everything on the page but the JQPlot chart.
Code: Visual Basic.NET
Protected Sub btnPrintToPDf_Click(sender As Object, e As EventArgs) Handles btnPrintToPDf.Click

        Try

   ASPXToPDF.RenderAsPDF()

        Catch ex As Exception
            CF.ErrorHandler(ex)
        End Try

    End Sub
eo_support
Posted: Friday, June 22, 2012 5:12:16 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
binarybrain
Posted: Friday, June 22, 2012 5:24:07 PM
Rank: Newbie
Groups: Member

Joined: 6/22/2012
Posts: 3
Thank you for the quick response. I don't seem to have MinLoadWaitTime as an option. I would set by EO.PDF.HtmlToPdfOptions.xxx , correct?
eo_support
Posted: Friday, June 22, 2012 7:48:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

You would do "EO.Pdf.HtmlToPdf.Options.MinLoadWaitTime = xxxx".

Thanks!
binarybrain
Posted: Monday, June 25, 2012 9:23:14 AM
Rank: Newbie
Groups: Member

Joined: 6/22/2012
Posts: 3
I added the following:

EO.Pdf.HtmlToPdf.Options.MinLoadWaitTime = 1000
ASPXToPDF.RenderAsPDF()

And I'm still not getting my JQuery chart. Any other ideas?

Thank you.
eo_support
Posted: Monday, June 25, 2012 11:26:49 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please check whether you are using the latest version. If you are already using the latest version but still can not get the chart, please try to isolate the problem into a test project and send the test project to us. Once we have that we will run it here. Usually as soon as we can see the problem, we will be able to find out why for you.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.