Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3816

PDFDocument.AddChart() not available for Web?

$
0
0

I have cross-platform code (below) that adds my Xojo Chart to a PDFDocument. This works for Desktop and iOS, but it seems PDFDocument.AddChart(…) is missing on Web.

How can I add a WebChart to a PDFDocument?

#If TargetDesktop Then
  If CommonExportPopoverValues.myChartXojo IsA DesktopChart Then
    tempPDFDocument.AddChart(DesktopChart(CommonExportPopoverValues.myChartXojo), HeaderLineStartPointX, HeaderLineStartPointY, g.Width - (LeftRightBottomMargin * 2), g.Height - HeaderLineStartPointY - (g.Height - FooterLineStartPointY))
  End If
  
#ElseIf TargetWeb Then  'error with PDFDocument.AddChart()
  If CommonExportPopoverValues.myChartXojo IsA WebChart Then
    tempPDFDocument.AddChart(WebChart(CommonExportPopoverValues.myChartXojo), HeaderLineStartPointX, HeaderLineStartPointY, g.Width - (LeftRightBottomMargin * 2), g.Height - HeaderLineStartPointY - (g.Height - FooterLineStartPointY))
  End If
  
#ElseIf TargetiOS Then
  If CommonExportPopoverValues.myChartXojo IsA MobileChart Then
    tempPDFDocument.AddChart(MobileChart(CommonExportPopoverValues.myChartXojo), HeaderLineStartPointX, HeaderLineStartPointY, g.Width - (LeftRightBottomMargin * 2), g.Height - HeaderLineStartPointY - (g.Height - FooterLineStartPointY))
  End If
#EndIf

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3816

Trending Articles