cancel
Showing results for 
Search instead for 
Did you mean: 

Unicode characters replaced by hash sign when output medium is 5 (send external)

KKilhavn
Active Contributor

I have implemented the purchase order smart form according to the guidelines in the Best Practices Baseline package for Norway.

Basis release 740, Application Platform release 700.

When using output medium 1 (Print) and a printer with access method M (Email) and driver PDFUC (PDF Unicode 1.2) the output is correct.

With output medium 5 (Send external) - regardless of printer - bullet point characters (U+2022) and long dashes (U+2013) are replaced by hash signs.

With output medium = 1 and a printer using driver PDF1 (PDF ISO Latin-1) the same replacement of unicode characters occur.

This indicates that the function module CONVERT_OTF, which creates the PDF that is attached to the email generated when output medium is 5, does not support unicode. Since the output is as expected with the unicode PDF driver I have ruled out that this can be caused by problems in Adobe PDF Reader or local fonts on the PC.

However, as far as I understand from various OSS Notes the CONVERT_OTF function module should support unicode.

Here's what I recall having tried to solve the problem.

Report RSTXPDF3

I have tried changing the options for the PDF converter, setting USE_CASCADING = On, UPE_FONTS_CASC = On and eventually also NO_FONT_SUBSET = On, without noticing any difference.

Report RSTXPDF2UC

I have tried the "Change Settings" option for Fonts from Font Repository without noticing any difference in behaviour.

The font mapping SAP -> PDF lists the used fonts (HELVE) for device type SWINCF as using the font integrated in PDF VIewer.

There seems to be no custom settings for font mapping.

I have also tried (after finding the tip here on SCN) the SAP symbols (Insert, Characters, SAP Symbols) where symbol SYM_FILLED_CIRCLE is a nice bullet point. When this character is selected "<680>" is inserted in the SAP Script editor of the text module.

The filled circle is included in all the printouts, although half overlapped with the next character. This is no solution as entering <680> as the bullet character in the list style gives the expected result: <680> (and not the symbol) is used as the list character - and a list character is needed for proper alignment of multi-line list items.

And of course I have asked The Machine Which Can Answer Many Questiosn (Google) - without finding a solution. I can't be the first person to need Unicode punctuation characters in a Smart Form - so please share your wisdom!

For a fixed text I can replace these characters with non-unicode characters, but the characters can also be part of the item description or one of the item or header long texts that are included in the output - so replacements are not an option. We have to either get the unicode characters included in the PDF when using output medium = 5 or warn our purchasers that they have to check for incorrect output when the vendor gets the purchase order via email.

Accepted Solutions (0)

Answers (2)

Answers (2)

aidan_black
Active Contributor
0 Kudos

Hi,

The solution to set USE_CASCADING = ON via RSTXPDF3 should work. This will only work if fonts that support these characters are installed via RSTXPDF2UC. or if you use UPE, the fonts should be in the font repository.

Try removing the setting UPE_FONTS_CASC = ON. Then the same fonts should be used as are used with print via PDFUC.

Regards,
Aidan


Florian
Active Contributor
0 Kudos

Hi again,

I searched my documents and found one functionstone which might be able to fix it, because you can choose your destination for converting.


CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF' "

  EXPORTING

  format_src = " sx_format Current format

  format_dst = " sx_format Required format

* addr_type = " sx_addr_type Transmission method

* devtype = " sx_devtype SAPscript device type for conversion

* funcpara = " sx_funcpar Optional function parameter

  CHANGING

  transfer_bin = " sx_boolean

  content_txt = " soli_tab

  content_bin = " solix_tab

  objhead = " soli_tab Object header

  len = " so_obj_len

  EXCEPTIONS

  ERR_CONV_FAILED = 1 " Conversion could not be executed

  . " SX_OBJECT_CONVERT_OTF_PDF

Maybe you can give it a try...

Additional to that, I know there is some customizing available for the converting, but I forgot to make me a node about it. Perhaps you can dig for it using the functiongroup. I'm away for the next few days so if you do not find anything let me know and I will try to remember it when back in town.

~Florian

KKilhavn
Active Contributor
0 Kudos

Thank you for the suggestion, but SX_OBJECT_CONVERT_OTF_PDF calls CONVERT_OTF to perform the actual conversion.

However, I found today in transaction SPAD that device type SWINCF (which is used for this conversion if I understood things correctly) is set up with a UTF-16LE code page (4220 as 1. character set and 4103 as synthetic character set).

In transaction SCOT the code page settings for send type INT is code page 4110 which is a UTF-8 code page.

I was hoping that this difference was relevant, but when I tried to change the settings to match (I have tried both changing the device type and changing the SCOT setting) I did not notice any difference in the output.