[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Thomas Turn Jensen

12/9/2005 9:08:00 AM

Does anyone have any experience implementing additional fonts in Axapta for
printing to PDF?

The problem is that a font such as "Courier New" is unknown to the PDFViewer
class and so is substituted with Helvetica. Obviously this is not a good
solution as Courier New is fixed width and Helvetica is not.

Furthermore, Arial is substituted with Helvetica, and while neither is fixed
width, it results in some wierd label issues when using international
characters, such as "æøå" - they seem to become too wide and so part of the
text is skipped when using a right aligned label.

FYI, using Axapta 3.0 SP2

Thanks in advance,
1 Answer

Freezie

12/12/2005 3:45:00 PM

0

Adding a new font requires that you know the PDF settings for a particular
font. You can get these from a font supplier in a *.AFM file. Create a class
similar to one that already exists (sys+font)... e.g. duplicate
sysPDFCourier, and modify the methods so that the settings for your specific
font match.

The next part is to modify class 'PDFViewer' to use the new font. This is in
methods 'addfont', 'new' and 'predefinedFontFactory'.

Hope this helps.

"Thomas Turn Jensen" wrote:

> Does anyone have any experience implementing additional fonts in Axapta for
> printing to PDF?
>
> The problem is that a font such as "Courier New" is unknown to the PDFViewer
> class and so is substituted with Helvetica. Obviously this is not a good
> solution as Courier New is fixed width and Helvetica is not.
>
> Furthermore, Arial is substituted with Helvetica, and while neither is fixed
> width, it results in some wierd label issues when using international
> characters, such as "æøå" - they seem to become too wide and so part of the
> text is skipped when using a right aligned label.
>
> FYI, using Axapta 3.0 SP2
>
> Thanks in advance,