Skip to Content
author's profile photo Former Member
Former Member

MS Office Current Formats to PDF conversion

A bit of a stretch for the forum, probably, but I'll ask.

I'm using a web service to convert uploaded MS Office files to PDF. To do that, I convert my binary table to an xstring, call my webservice supplying the xstring, and get back a converted XSTRING that goes back into a binary table.

This works perfectly for "old" MS Office formats, like .doc, .xls, etc. But, it always fails (No renditions) for .docx, .xlsx., etc.

My question is: is anyone aware of any requirement to format internal tables, xstring, etc., created from uploaded docx, xlsx, etc., files differently for software that does a PDF conversion? I don't have any documentation or insight into what the web service does for me... so just asking if anyone is aware of any changes that have to be considered for say, doc vs. docx files.

An update: from research, I see that docx, xlsx, etc., are stored in Open XML format as opposed to binary format.

Update: Open XML is very unforgiving when it comes to lengths. To work with the files as an xstring, one must use precisely the length of the file. This is not true of the older MS Office binary formats....so, here are my solution steps:

gui_upload into binary table (gl_gui_frontend_services)

get the file size (cl_gui_frontend_services)

call method cl_gui_cfw=>flush to receive the file length value.

convert the binary table to xstring with FM 'SCMS_BINARY_TO_XSTRING', with input_length parameter = file size from step 2.

if the length of the xstring is = file length.

call the webservice, supplying xstring and getting back a converted-to-PDF xstring.

put converted xstring back into binary table with FM 'SCMS_XSTRING_TO_BINARY'

proceed with my archival storage into documentum.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Sep 07, 2016 at 01:41 PM

    you could post the code?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.