Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
295
chart x axis got cut when exported to pdf.
posted

Hi,

I create a scatter chart and modify the x axis label to Century Gothic Size 8, Angle 330. The chart looks fine (check chart before pdf.bmp on the zip attached). However, when i use the code below, the pdf shows that the x axis is cut (check chart after pdf.pdf in the zip file attached). Can you tell me what is wrong? Thanks. Bobby Pohan.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Private

 

 

Overloads Sub

Export2PDF()

 

 

Try

 

 

Dim report As New

Infragistics.Documents.Report.Report()

 

 

Dim section1 As

Infragistics.Documents.Report.Section.ISection = report.AddSection

 

 

'centering the chart on pdf doc

section1.PageOrientation = Infragistics.Documents.Report.PageOrientation.Landscape

section1.PagePaddings.Top = 60

 

 

Dim band1 As

Infragistics.Documents.Report.Band.IBand = section1.AddBand

 

 

'moves the resource to left and top

band1.Paddings =

 

New

Infragistics.Documents.Report.Paddings(13)

 

 

Dim canvas As

Infragistics.Documents.Report.ICanvas = band1.AddCanvas

 

 

Dim g As

System.Drawing.Graphics = canvas.CreateGraphics()

 

 

' define a string that contains the path to

 

 

Dim folderPath As String

= m_FolderName

 

 

If Microsoft.VisualBasic.Right(folderPath, 1) <> "\" Then folderPath = folderPath &

"\"

 

 

'convert the chart resource to PDF graphics

m_NLDChart.RenderPdfFriendlyGraphics(g)

 

'(g, m_NLDChart.Width, m_NLDChart.Height)

 

 

'publishes the report

report.Publish(folderPath & m_FileName &

 

".pdf"

, Infragistics.Documents.Report.FileFormat.PDF)

ErrorTrapping.ExportSuccessfulMessage(m_FileName &

 

".pdf"

)

 

 

Catch ex As

Exception

 

 

Throw

ex

 

 

End

Try