cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot extract the embedded font arial.Some char might not be displayed

Former Member
0 Kudos

Hi Folks,

Our requirement is to generate the customer account statement for a set of cusomters during a particular period.

we use a script to generate the statement and convert it to pdf.This pdf is then stored in the application server and retrived using cg3y transaction.The transaction allows the statement to be generated for multiple customers and company code.

the problem that we face is that the first customer account statement is generated properly the rest of the statements are not displayed properly.When we open the customer account statement we get the error 'Cannot extract the embedded font arial.Some characters might not be displayed properly'.All the Headings that we of the font BOLD ARIAL were not displayed.

This error does not occur for the first pdf file generated.(say we have 3 customers for the 1st customer pdf is proper however for the next two error'.

.

When I checked the application server I found that the first file has font subtype as Type1 and then rest of the files have font subtype as Truetype.

This is working fine.I downloaded the file to pc using cg3y.the pdf looks fine.

Directory: /home/nwfound/n_us_cas

Name: 0010798791US13122009.PDF

%PDF-1.3#

%#####

2 0 obj#

/WinAnsiEncoding#

endobj#

3 0 obj#

<<#

%Devtype SAPWIN Font COURIER normal Lang EN#

/Type /Font#

/Subtype /Type1# ****see here font subtype is type1

/BaseFont /Courier#

/Name /F001#

/Encoding 2 0 R#

>>#

endobj#

4 0 obj#

<<#

/Filter 5 0 R#

/Length 6 0 R#

/Length1 352224#

>>#

stream#

This one is not working fine.Gives an error 'Cannot extract the embedded font arial.Some characters might not be displayed properly when downloaded to pc using cg3y.The heading that were of font ARIAL BOLD were not displayed.

Directory: /home/nwfound/n_us_cas

Name: 0010000105US13062010.PDF

%PDF-1.3#

%#####

2 0 obj#

/WinAnsiEncoding#

endobj#

3 0 obj#

<<#

%Devtype SAPWIN Font COURIER normal Lang EN#

/Type /Font#

/Subtype /TrueType# - see here the subtype is True type.How can i change this?

/BaseFont /Courier#

/Name /F001#

/Encoding 2 0 R#

>>#

endobj#

4 0 obj#

<<#

/Filter 5 0 R#

/Length 6 0 R#

/Length1 352224#

>>#

I have to change the tont subtype to Type1 as in my first cust. statement.Is there a way to this???????

There can be no problem with the code cause the account statement generated for first customer is perfect.

Any suggestions will be appreciated.

IF hotfdata[] IS NOT INITIAL.

*Convert otf data to pdf lines.

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

IMPORTING

bin_filesize = l_size

TABLES

otf = hotfdata

lines = li_pdf_output

EXCEPTIONS

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

err_bad_otf = 4

OTHERS = 5.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*clear hotfdata otherwise next empty cust acc. statement may have

*this data.

REFRESH:hotfdata.

CLEAR hotfdata.

*If account statement is generated then set w_flag to generate email.

w_flag = 'X'.

*The converted pdf lines are of char132 format.

*They have to be converted to char255 format.

LOOP AT li_pdf_output INTO lwa_pdf_output.

TRANSLATE lwa_pdf_output USING ' ~'.

CONCATENATE l_gd_buffer lwa_pdf_output INTO l_gd_buffer.

CLEAR lwa_pdf_output.

ENDLOOP.

TRANSLATE l_gd_buffer USING '~ '.

REFRESH li_mess_att.

DO.

li_mess_att = l_gd_buffer.

APPEND li_mess_att.

SHIFT l_gd_buffer LEFT BY 255 PLACES.

IF l_gd_buffer IS INITIAL.

EXIT.

ENDIF.

ENDDO.

CLEAR x_objcont.

REFRESH x_objcont.

LOOP AT li_mess_att.

x_objcont = li_mess_att.

APPEND x_objcont.

ENDLOOP.

*application file name

CONCATENATE po_filun kna1-kunnr save_bukrs datum02+4(2)

datum02(4) lc_pdf INTO l_filename.

CONDENSE l_filename NO-GAPS.

CONCATENATE file l_filename INTO file.

CONDENSE file NO-GAPS.

*Transer pdf data to app. server.

"data len type i.

OPEN DATASET file FOR OUTPUT IN BINARY MODE.

LOOP AT x_objcont.

TRANSFER x_objcont TO file.

ENDLOOP.

CLOSE DATASET file.

ELSE.

REFRESH:hotfdata.

CLEAR hotfdata.

ENDIF.

Accepted Solutions (0)

Answers (2)

Answers (2)

aidan_black
Active Contributor
0 Kudos

Hi,

this can be related to the compression of the PDF file.

You can turn off the FlateDecode compression again via report RSTXPDF3 as described in Note #843480. It is a little confusing. The option 'FLATE_COMPR_OFF' needs to be set to 'On' to turn off the FlateDecode compression.

To set this please run as follows:

se38 -> RSTXPDF3 -> enter 'FLATE_COMPR_OFF' in the 'Name' field -> Select 'Change Settings' radio button

You will get a pop-up 'Do not use flat compression'.

Select the 'on' button.

After this check if the PDF is created correctly.

regards,

Aidan

Sandra_Rossi
Active Contributor
0 Kudos

Is it a problem of sequence, or a problem with content: did you test by printing the second one in place of the first one?

There are many corrections in the PDF converter, did you check them?

Former Member
0 Kudos

Hi,

Was there any solution for this error.. I am getting exactly the same error.

Can someone please help me with this.

Regards

Naeem

Former Member
0 Kudos

Anyone found a solution to this problem ?