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 font into generated PDF?

Former Member
0 Kudos

Hi,

I have an issue with cyrillic fonts in PDF-file, generated from smartform using the following mechanism:

1. Run FM for smartform with ==> getotf = 'X'

2. Perform CONVERT_OTF retrieving result into a XSTRING.

3. Converting xstring content into a table using "cl_document_bcs=>xstring_to_solix).

4. Creating mail to an external internet user with attached pdf ==> using "cl_document_bcs=>create_document..."

Smartform contains cyrillic content, based on HELVCYR (Helvetica cyrillic) font. Application server is based on Windows.

Everything worked well (for months!) for allmost all of the clients of our customer. Of course, some of clients have different OS-es (such as Linux, Mac OS, etc.), and then the problem starts - they doens't view properly the cyrillic content. English content (even numbers, etc.) are properly displayed. We found what fonts are used in the PDF, but my questions are:

1. Is it possible to embed the font into generated PDF-content?

2. If no, is it possible to generate PDF-content non-selectable (i.e. in some image mode) ?

If yes, how to do this?

Or is there any other way to workarround this issue - to be able to display mail with attached PDF-content with cyrillic on different OS-es? It would be better if it is possible without calling external converter...

Any help would be highly appreciated.

Thanks in advance.

Regards,

Ivaylo Mutafchiev

3 REPLIES 3

Former Member
0 Kudos

Hello Ivaylo Mutafchiev,

There is no way we can control the fonts in the created PDF / while creating the PDF using the class cl_document_bcs in your PDF creation logic.

You can try some other approach of creating PDF from the Smartforms OTF stream data .

Try using the follosing FM for the PDF creation and sending email:

CONVERT_OTF_2_PDF

CONVERT_OTF_AND_MAIL

SO_OBJECT_SEND

CONVERT_OTF_AND_MAIL_NEW (Try this but this FM still uses the class that you are using currently. But give it a try and see the results)

Hope this answers your question.

Thanks,

Greetson

0 Kudos

Hi Greetson,

thanks for the reply. I'll give it a try, but it seems there is no fields in the interface for mentioned FM-s which to control whether to import fonts, or no. So IMHO the mentioned FM-s won't do the trick.

I think we are talking about different concept and approach here, not about different implementation of the convertion logic. I can't find information if there is such a concept implemented (to add font to the converted PDF, or to convert PDF to a non-selectable document, i.e. image type).

Once again - thanks, I'll pass answers here as soon as I get the results.

Regards,

Ivaylo

Former Member
0 Kudos

You set the output_options to send smartform, right?

Like this:

output_options-tddest = 'LP01'.

Change the device destination. Try different devices. If any device won't fix this, create a new one for your need in SPAD.

Excuse my english and take it easy.