Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Embed fonts in PDF document created from SAP Script form

Former Member
0 Kudos

Hi ,

We have a requirement of embedding the fonts in PDF document. We are creating PDF from spool of Sap script.

Can anybody please tell me, how to achieve this?

I read a number of posts on this but no clear solution was there. as per them we need to install true type fonts into our system, but none has mentioned which fonts, is there any list of fonts that we need to install?

once the installation is done, do we need to use same fonts in our sap script ? or this can be used later while converting the spool into PDF ?

do we need to change the printer also?

we are working on 4.6c system which is non-unicode.

Thanks in Advance

rajpal Sehrawat

1 ACCEPTED SOLUTION

alexander_bolloni
Contributor

Hello Rajpal,

embedding fonts in PDF when converting a SAPscript/Smart Form to PDF is only done under certain circumstances. It is important to understand that you cannot force this embedding. Embedding will take place if...

A) You uploaded a custom TrueType font according to note 201307. It is named Zxxxx in SAPscript forms/styles and you actually selected this font in your form and in the spool request data. The font will automatically be embedded when you convert your spool to PDF.

B) You use non-Latin-1 language forms and have, for this purpose, installed truetype fonts via RSTXPDF2 (or RSTXPDF2UC for Unicode device types like SWINCF, PDFUC). In this case, if you have indeed installed a truetype font as "PDF replacement font", this font will be embedded, if your spool request contains a form in the respective language.

If your form is, for example, a plain English form with language key EN and uses SAP standard font families like HELVE, COURIER, there is no way that OTF-PDF conversion will embed a TrueType font in your PDF.

Best regards,

  Alexander

8 REPLIES 8

nabheetscn
Active Contributor
0 Kudos

Hi

Please check this sap note to install true type fonts

201307 - TrueType fonts for Smart Forms or SAPscript

Thanks

Nabheet

0 Kudos

Hi Nabheet,

thanks for the reply.

how to check, that true type fonts are already installed in system or not?

thanks

Rajpal Sehrawat

0 Kudos

This message was moderated.

alexander_bolloni
Contributor

Hello Rajpal,

embedding fonts in PDF when converting a SAPscript/Smart Form to PDF is only done under certain circumstances. It is important to understand that you cannot force this embedding. Embedding will take place if...

A) You uploaded a custom TrueType font according to note 201307. It is named Zxxxx in SAPscript forms/styles and you actually selected this font in your form and in the spool request data. The font will automatically be embedded when you convert your spool to PDF.

B) You use non-Latin-1 language forms and have, for this purpose, installed truetype fonts via RSTXPDF2 (or RSTXPDF2UC for Unicode device types like SWINCF, PDFUC). In this case, if you have indeed installed a truetype font as "PDF replacement font", this font will be embedded, if your spool request contains a form in the respective language.

If your form is, for example, a plain English form with language key EN and uses SAP standard font families like HELVE, COURIER, there is no way that OTF-PDF conversion will embed a TrueType font in your PDF.

Best regards,

  Alexander

0 Kudos

Hi Alexander,

thanks for the reply. i am not much experianced with downloading fonts etc. generally BASIS does this activity.

We are creating spool for SAP Script, which uses fonts from HELVE and COURIER families.

the scripts are in language SE, DK , NO, EE, LV,LT.

Attached is the sample of PDF which we are getting after converting spool to PDF.

can you please suggest what exactly should we download using SE73? what file?

once we download the stuff, then instead of using font HELVE and COURIER ... we should use the downloaded fonts with names like ZHELVE and ZCOURIER. Am i right?

this means we have to make change in complete script to change the font family names.

thanks

Rajpal

0 Kudos

Hi Rajpal,

ok, now I understand. You have SAPscript forms in Western languages based on Latin-1 charset (ISO 8859-1). And you use standard SAPscript fonts like HELVE; TIMES; COURIER.

This is kind of best practice for these languages and I would not advise you to change the fonts or attempt to upload customer-owned truetype fonts in SE73 just to fulfill the "embed fonts in PDF" requirement. This will have all kinds of unwanted effects (formatting changes, print jobs get a lot bigger...) so don't do this!

Honestly I believe there is no way you get the OTF-PDF converter to embed any fonts for such documents (fonts which you would need to license and upload into SAP in the first place). But I don't think there is a need to. What exactly is behind this requirement? When you use only Latin-1 character set and the standard COURIER,HELVE,TIMES SAPfonts (which are mapped to related standard Adobe Reader fonts) your customer or their customers, whoever receive the PDFs generated from the SAP system should never have a problem displaying or printing these.

This is because the PDF standard more or less guarantees that these "base14 fonts" must be present in each Reader/Viewer and they must cover the "Adobe Standard Encoding" which, in effect, covers Latin-1.

All the discussions and notes you find about font embedding in PDF concern either

- custom fonts installed by the customer

or

- supporting non-Latin-1 character sets/scripts such as Latin-2, Cyrillic, Greek, Thai,.. where you indeed need to embed fonts in order to be sure that the text can be displayed in every PDF Reader

Best regards,

  Alexander

0 Kudos

Hi Alexander,

Thanks For your help!!

we installed the fonts and changed SAP Scripts with these fonts. we encountered layout issues and we resolved them.

But we are facing one more problem. BALTIC characters are now displayed incorrectly in the printout.

we have a defined printer to be used to baltic countires. it works fine with standards fonts HELVE,COURIER and ARIEL. Now special baltic characters are not printed by this printer after changing the fonts to customized one.

are we supposed to do anyhing at printer side also? what could be the solution ?

Thnaks

Rajpal Sehrawat

0 Kudos

Hi Rajpal,

what device type are you using for printing baltic documents?

In a non-Unicode 46C system I don't think you have many options for a device type which supports baltic characters (I assume you mean ISO 8859-4 character set).

And it could be that Baltic character downloading+printing does not work properly for custom fonts, even if you have a device type which correctly supports Baltic chars for COURIER,HELVE; TIMES.

Best regards,

  Alex