Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

PsRBExportDevice Pro - Divide by Zero Error

edited April 2008 in General
Recently I purchased the PSRBExportDevices Pro so that I could export a
report to PDF. I purchased these components because the standard PDFDevice
produced a less than desirable result. However, now I get a fatal error
"Divide by Zero" in the following block of the component's code at
Result.FAscent.....

function TPsPDFFont.GetPDFFontAttrib: TPsPDFFontAttrib;
begin
Result.FFontName := FFont.Name;
Result.FCharset := FontCharset;

Result.FFlags := IntToStr(GetPDFFontFlags);
Result.FAscent := FHhea.FAscender * 1000 div FHead.FUnitsPerEm;
Result.FDescent := FHhea.FDescender * 1000 div FHead.FUnitsPerEm;
Result.FCapHeight := FOS_2.FCapHeight * 1000 div FHead.FUnitsPerEm;
Result.FAvgWidth := FOS_2.FAverageCharWidth * 1000 div FHead.FUnitsPerEm;
Result.FMaxWidth := FHhea.FAdvanceWidthMax * 1000 div FHead.FUnitsPerEm;
Result.FStemV := 78;
Result.FItalicAngle := Round(FPost.FItalicAngle);
Result.FStrikeoutPosition := FOS_2.FYStrikeoutPosition *
1000 div FHead.FUnitsPerEm;
Result.FStrikeoutSize := FOS_2.FYStrikeoutSize *
1000 div FHead.FUnitsPerEm;
Result.FUnderlinePosition := FPost.FUnderlinePosition *
1000 div FHead.FUnitsPerEm;
Result.FUnderlineSize := FPost.FUnderlineThickness *
1000 div FHead.FUnitsPerEm;
Result.FFontBBox := Rect(FHead.FXMin * 1000 div FHead.FUnitsPerEm,
Result.FAscent, Result.FMaxWidth, Result.FDescent);
end;

I have email Pragnaan for assistance, but did not get any reply.

Have you run across this before. I kind of in a pinch and need to get the
report out today.

Thanks in advance.

Comments

  • edited April 2008
    Craig:

    you should contact the vendor. Also, seeing the code is copyrighted, you may
    not want to be posting it.

    Edward Dressel
    Team DM
  • edited April 2008
    thanks

    Craig:

    you should contact the vendor. Also, seeing the code is copyrighted, you may

    not want to be posting it.

    Edward Dressel
    Team DM
This discussion has been closed.