PDF Image Export
Posted: Sun May 20, 2012 7:18 pm
I'm currently trying to get the PDF export option to work correctly with images.
Unfortunately I'm encountering a serious problem related to the zoom percentage of the viewer.
If the zoom percentage is 100% then the images are exported in the PDF at the correct size.
However, if the percentage is not 100% then the images are either increased or decreased in size by the percentage amount.
For example if the report viewer zoom % is 200% the images in the PDF file are twice the size they should be.
I'm using the following vb.net code to view the report: -
Public Sub ViewReport(ByVal reportResourceName As String)
StiOptions.Viewer.Elements.ShowReportOpenButton = False
StiOptions.Viewer.Elements.ShowPageNewButton = False
StiOptions.Viewer.Elements.ShowPageDeleteButton = False
StiOptions.Viewer.Elements.ShowBookmarksPanel = False
StiOptions.Viewer.SaveReportsButtons.ShowDocumentButton = False
Dim report As New StiReport
Dim a As Assembly = Assembly.GetCallingAssembly()
Using sr As StreamReader = New StreamReader(a.GetManifestResourceStream(reportResourceName))
report.Load(sr.BaseStream)
End Using
report.CalculationMode = StiCalculationMode.Interpretation
report.RegBusinessObject("ReportModel", "ReportModel", Me)
report.Render()
report.Show()
End Sub
In all cases the preview and print options are working okay, it's the pdf export which is the problem.
Thanks in advance for any help you can provide.
--
Chris Cook :: Software Development Manager :: www.genesisit.co.uk
Unfortunately I'm encountering a serious problem related to the zoom percentage of the viewer.
If the zoom percentage is 100% then the images are exported in the PDF at the correct size.
However, if the percentage is not 100% then the images are either increased or decreased in size by the percentage amount.
For example if the report viewer zoom % is 200% the images in the PDF file are twice the size they should be.
I'm using the following vb.net code to view the report: -
Public Sub ViewReport(ByVal reportResourceName As String)
StiOptions.Viewer.Elements.ShowReportOpenButton = False
StiOptions.Viewer.Elements.ShowPageNewButton = False
StiOptions.Viewer.Elements.ShowPageDeleteButton = False
StiOptions.Viewer.Elements.ShowBookmarksPanel = False
StiOptions.Viewer.SaveReportsButtons.ShowDocumentButton = False
Dim report As New StiReport
Dim a As Assembly = Assembly.GetCallingAssembly()
Using sr As StreamReader = New StreamReader(a.GetManifestResourceStream(reportResourceName))
report.Load(sr.BaseStream)
End Using
report.CalculationMode = StiCalculationMode.Interpretation
report.RegBusinessObject("ReportModel", "ReportModel", Me)
report.Render()
report.Show()
End Sub
In all cases the preview and print options are working okay, it's the pdf export which is the problem.
Thanks in advance for any help you can provide.
--
Chris Cook :: Software Development Manager :: www.genesisit.co.uk