cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with PDF content generated by CONVERT_OTF

Former Member
0 Kudos

Hi,

We are facing a problem with the version of the pdf content generated by FM CONVERT_OTF.

Data returned by this FM in the parameter BIN_FILE is in XSTRING or HexaDecimal Format.

As I am sending this PDF content to a Portal through RFC, they are unable to open the file in lower versions of Adobe.

The file is opened only in 8 and above versions of Adobe.

Is there anything which can be done in SAP so that the PDF content generated in SAP will be opened in the lower versions also.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

It was a problem on the web portal that is used. Problem with lower version of explorer.

Thanks for the assistance

Sandra_Rossi
Active Contributor
0 Kudos

You say "unable to open", what are the exact symptoms?

Did you notice something special in the PDF? (special language characters, fonts other than the usual ones, bidirectional text, etc.)

Did you look for sap notes too?

Maybe the best is to contact SAP if you use SAP Enterprise Portal.

Former Member
0 Kudos

Its not SAP Portal. It is Java Portal.

The Error is after downloading the PDF, when I try to open 'The Selected Document Cannot be Opened'.

brad_bohn
Active Contributor
0 Kudos

I agree with Norman - haven't seen issues directly related to older versions of Adobe Reader and there aren't any notes about it that I can see. I would suggest downloading the file content directly after conversion with GUI_DOWNLOAD and checking whether or not you can open it outside of the portal. What type of device is running the portal application? We did have issues with mobile devices that couldn't open PDF's generated by SAP before, but the fix was a Microsoft fix for the device, not SAP.

Sandra_Rossi
Active Contributor
0 Kudos

Is "java portal" a new concept? If it's a SAP java portal, then it's SAP enterprise portal (EP)

Could you try without the portal?

Do you also use citrix or another application virtualization software?

Could you answer these other last unanswered questions:

- Did you notice something special in the PDF? (special language characters, fonts other than the usual ones, bidirectional text, etc.)

- Did you look for sap notes too?

Former Member
0 Kudos

Can you try with the belos stuff?

  • Converting to PDF

CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'

EXPORTING

src_spoolid = loc_spool (pass spool number here)

no_dialog = ' '

IMPORTING

pdf_bytecount = numbytes

pdf_spoolid = pdfspoolid

btc_jobname = jobname

btc_jobcount = jobcount

TABLES

pdf = pdf

EXCEPTIONS

err_no_otf_spooljob = 1

err_no_spooljob = 2

err_no_permission = 3

err_conv_not_possible = 4

err_bad_dstdevice = 5

user_cancelled = 6

err_spoolerror = 7

err_temseerror = 8

err_btcjob_open_failed = 9

err_btcjob_submit_failed = 10

err_btcjob_close_failed = 11.

  • Map PDF table into 'flat' table acording to Unicode flag

LOOP AT pdf INTO wa_pdfline.

ASSIGN wa_pdfline TO <l_xline> CASTING.

CONCATENATE pdf_xstring <l_xline> INTO pdf_xstring IN BYTE MODE.

ENDLOOP.

Use this PDF_XSTRING as the output of the RFC and same you can use it JAVA webdynpro. I hope this will provide the solution

Let me know if you still have any problem

Best Regards,

JR

Former Member
0 Kudos

I have used FM SX_OBJECT_CONVERT_OTF_PDF with older versions of Adobe Reader and never had problems.

I see this function module calls CONVERT_OTF and then does some additional processing of the data.

Former Member
0 Kudos

Hi Norman,

Thanks for the Response.

I have the OTF data imported from Smartform.

I didn't see any field for this FM to pass the OTF data.

Could you pls let me know, how can we send OTF to this FM and get PDF content.

Former Member
0 Kudos

The CONTENT_BIN parameter is the binary PDF data.

I have something like the code below. The GS_JOB_OUTPUT_INFO-OTFDATA comes from the SmartForm function module.


DATA: ls_otf    TYPE itcoo,
           ls_pdf   TYPE solisti1.

* convert OTF data to PDF
  LOOP AT gs_job_output_info-otfdata INTO ls_otf.
    CONCATENATE ls_otf-tdprintcom ls_otf-tdprintpar
         INTO ls_pdf.
    APPEND ls_pdf TO lt_content_txt.
  ENDLOOP.
  CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
      format_src      = 'OTF'
      format_dst      = 'PDF'
    CHANGING
      transfer_bin    = lv_transfer_bin
      content_txt     = lt_content_txt
      content_bin     = lt_content_bin
      objhead         = lt_objhead
      len             = lv_len
    EXCEPTIONS
      err_conv_failed = 1
      OTHERS          = 2.