Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to PDF in .NET - Font Differences in OS's

Status
Not open for further replies.

ciscowiz

MIS
Apr 21, 2004
146
US
I am exporting reports to PDF using ASP and VB.NET but my custom font appears larger when rendered on a Windows2000 server than when it is rendered on XP/2003 server. I am thinking that since it renders properly on XP/2003 there must be different files being used between the OS's. I have tried installing the same print drivers on both machines as well as updating crystal. The Windows2000 machine is far more up to date than XP/2003. The code I am using uses the CrystalDecisions.Shared namespace. I included it below in case it helps.

Code:
Public Sub ExportData(ByRef oRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument)
        Dim oDest As New CrystalDecisions.Shared.DiskFileDestinationOptions
        Try
            oRpt.ExportOptions.ExportDestinationType = CrystalDecisions.[Shared].ExportDestinationType.DiskFile
            oRpt.ExportOptions.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
            oDest.DiskFileName = "report.pdf"
            oRpt.ExportOptions.DestinationOptions = oDest
            Dim ms As IO.MemoryStream = oRpt.ExportToStream(ExportFormatType.PortableDocFormat)
            Response.Clear()
            Response.Buffer = True
            Response.AddHeader("Content-Type", "application/pdf")
            Dim bBuffer() As Byte = ms.ToArray
            Response.BinaryWrite(bBuffer)
            Response.Flush()
            Response.Close()
        Catch e As Exception
        End Try
    End Sub

Does anyone know specifically what dlls are being used when the report is exported and then rendered as a pdf in a browser window? Is it just the crxf_pdf.dll? Does the adobe plug-in use native Windows drivers to render? That could explain the difference if adobe is using older Windows2000 drivers as opposed to the XP/2003 drivers. This is frustrating because it seems like a simple issue of different file versions between OS's.
Again any help is appreciated.

Thanks,
Bryan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top