Application Development and Automation 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: 
Read only

OTF to PDF Format issues

former_member206439
Contributor
0 Likes
580

Hello,

I have used below set of code to convert OTF to PDF and for the some of the PDF it is working fine and For few I see the font and the formatting issues are there.

Format issues means when I compare Spool pdf and converted pdf they both look different.

* Convert OTF to PDF

   LOOP AT t_otfdata INTO wa_otf.

     CONCATENATE wa_otf-tdprintcom wa_otf-tdprintpar INTO wa_pdf.

     APPEND wa_pdf TO i_content_txt.

   ENDLOOP.

* Convert content to PDF

   CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'

     EXPORTING

       format_src      = c_otf

       format_dst      = c_pdf

     CHANGING

       transfer_bin    = wa_transfer_bin

       content_txt     = i_content_txt

       content_bin     = i_content_bin

       objhead         = i_objhead              "Object header

       len             = v_len_in

     EXCEPTIONS

       err_conv_failed = 1

       OTHERS          = 2.

   IF sy-subrc <> 0.

*    MESSAGE text-006 TYPE c_e.

   ENDIF.

Any thoughts?

Thanks

NN

Hello,

I have used below set of code to convert OTF to PDF and for the some of the PDF it is working fine and For few I see the font and the formatting issues are there.

Format issues means when I compare Spool pdf and converted pdf they both look different.

* Convert OTF to PDF

   LOOP AT t_otfdata INTO wa_otf.

     CONCATENATE wa_otf-tdprintcom wa_otf-tdprintpar INTO wa_pdf.

     APPEND wa_pdf TO i_content_txt.

   ENDLOOP.

* Convert content to PDF

   CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'

     EXPORTING

       format_src      = c_otf

       format_dst      = c_pdf

     CHANGING

       transfer_bin    = wa_transfer_bin

       content_txt     = i_content_txt

       content_bin     = i_content_bin

       objhead         = i_objhead              "Object header

       len             = v_len_in

     EXCEPTIONS

       err_conv_failed = 1

       OTHERS          = 2.

   IF sy-subrc <> 0.

*    MESSAGE text-006 TYPE c_e.

   ENDIF.

Any thoughts?

Thanks

NN

1 REPLY 1
Read only

FredericGirod
Active Contributor
0 Likes
522

Hi,

could you give us screenshot or part of screen shot to understand the differences

regards

Fred