Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Calibri font inserts extra characters into PDF ver Post Reply Post New Topic
Author Message
nwthilina
Newbie
Newbie


Joined: 04 Jul 2012
Location: Sri Lanka
Online Status: Offline
Posts: 2
Quote nwthilina Replybullet Topic: Calibri font inserts extra characters into PDF ver
    Posted: 04 Jul 2012 at 8:57pm
Calibri font inserts extra characters into PDF version of report
 

My company has several reports that are generated using the Calibri font. We've had several users tell us that their reports are showing extra characters - specifically, it inserts the letter "i" after every lower-case "t". For example, Scott becomes Scotiti and Tether becomes Tetiher (there's no letter "i" inserted after the capital "T" - it only inserts after lower-case).

We've determined that the problem is due to the fact that we're using the Calibri font; if we use a different font, it works fine. Also, if the end-user copies text from the generated PDF and pastes it into another document, it renders the correct spelling. So for example if they copy "Scotiti" out of the PDF and paste it into Notepad, it shows "Scott" as it normally should.

The obvious solution would seem to be changing the font on all of our reports to something else, but unfortunately we have hundreds of reports scattered across a half-dozen sites, and we would rather not have to change each and every report.

For the sake of completeness, I updated the Adobe Reader on one of the trouble machines to 9.1, and the problem still occurs.

Any Solution for this ?

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 05 Jul 2012 at 3:39am
What version of Crystal are you using?  Do you have the latest service pack/fix pack for that version?
 
If that doesn't work, there is no way to resolve the issue other than changing the font.  If you can program (or have access to a programmer) in Java or Visual Studtio, you might be able to create a program that will do this update for you so that you don't have to manually update all of them.
 
-Dell
IP IP Logged
nwthilina
Newbie
Newbie


Joined: 04 Jul 2012
Location: Sri Lanka
Online Status: Offline
Posts: 2
Quote nwthilina Replybullet Posted: 05 Jul 2012 at 4:32pm
Crystal Report which is comming from Visual Studio 2008
Yes i have installed latest Service Pack,
 
This error is comming when you directly export from the Report viewer(Crystal Report Loading Pannel)
 
But When you export to Other Type (word or Excel) this error is not happening
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 06 Jul 2012 at 2:49am
The .dll files for the exports are different based on the type of export, so you really can't compare them as they all use different code.  Unfortunately, I don't think you're going to be able to do anything about this except change the font. 
Since you're using VS 2008, you should be able to use the Crystal SDK to update the reports.  This has piqued my curiosity so I'm going to play with the code a bit and see if I can come up with a sample for you.
 
-Dell
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 06 Jul 2012 at 11:23am
Working in C# and using the ReportDocument object model, here's some sample code for changing fonts:
private void updateReport(ReportDocument doc)
{
  Font ft;
  foreach (Section sec in doc.ReportDefinition.Sections)
  {
    foreach (ReportObject obj in sec.ReportObjects)
    {
      if (obj.Kind == ReportObjectKind.FieldHeadingObject)
      {
        FieldHeadingObject fobj = (FieldHeadingObject)obj;
        ft = new Font("Arial", fobj.Font.Size, fobj.Font.Style, fobj.Font.Unit,
          fobj.Font.GdiCharSet, fobj.Font.GdiVerticalFont);
        fobj.ApplyFont(ft);
      }
      else if (obj.Kind == ReportObjectKind.FieldObject)
      {
        FieldObject fobj = (FieldObject)obj;
        ft = new Font("Arial", fobj.Font.Size, fobj.Font.Style, fobj.Font.Unit,
          fobj.Font.GdiCharSet, fobj.Font.GdiVerticalFont);
        fobj.ApplyFont(ft);
      }
      else if (obj.Kind == ReportObjectKind.TextObject)
      {
        TextObject fobj = (TextObject)obj;
        ft = new Font("Arial", fobj.Font.Size, fobj.Font.Style, fobj.Font.Unit,
          fobj.Font.GdiCharSet, fobj.Font.GdiVerticalFont);
        fobj.ApplyFont(ft);
      }
    }
  }
}
I don't see a way for changing the fonts in a crosstab or subreport, though.  Hopefully this will at least get you started if you decide to go this route.
-Dell


Edited by hilfy - 06 Jul 2012 at 11:24am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.016 seconds.