Application Development 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: 

DOCX to PDF conversion in ABAP

SAPAI
Participant
0 Kudos

Hi experts,

Any pointers for docx file to PDF file conversion within ABAP?

XSL-FO and OTF conversions are not retaining the document formatting & hence looking for alternative options within abap ( without using third party webservices ).

Any suggestions?

12 REPLIES 12

Former Member
0 Kudos

Hello Asif,

Please refer below notes. You may get some help.

Note 1777018 - Office integration - MS Word 2007/2010 with Content Controls

Note 1707600 - Office Integration for MS Word 2007/2010

Regards,

Sudhir Kothavale.

0 Kudos

Hello Sudhir,

Thanks for reply. I checked the Notes, they are more relevant to MS word formatting. I am getting a nicely formatted word document . It is DOCX file and I need to convert it to PDF within BADI so that the preview output would show PDF instead of DOCX ( currently).

DOCX(Xstring) is converted to PDF(Xstring) but the PDF file generated doesnot retain the original formattin of DOCX like bullets, numbering, hyperlink, indentation, overlapping lines.. etc.. its all messed up.

Any suggestion on the conversion to retain formatting?

0 Kudos

hello,

well if I may ask how are you planning to show the preview in BAdI ? Just trying to see what the complete requirement is before providing any solution.

regards

swanand

0 Kudos

Preview would be shown in the webdynpro application (office Control element ) which is displaying the file.. docx as well as PDF file, but in case of PDF the transformation is messing up the formatting and the content of pdf is messed and all docx formatting is lost.

Requirement is simple as such standard SAP is providing the well formatted docx (xstring ) file and we only need to convert ( in BADI )  it to pdf ( xstring ) along with retaining same formatting and look and pass it back to webdynpro application to display the preview ( PDF preview ) .

I hope it is clear...

SAPAI
Participant
0 Kudos

Any help?

0 Kudos

Update for anyone looking similar solution:

So far No perfectly working solution in ABAP without using 3rd party s/w.

As of now trying to use 3rd party web services ( Adobe LC or Share point ). Both serves the purpose.

Former Member
0 Kudos

Hi, there is a FM RSPO_DOCXPS_CREATEPDF. However we do not have it in our system. Has anybody found a solution to this without using a 3rd party?

0 Kudos

Hi Jozef,

Thanks for reply but I tried this FM but didn't serve the purpose. Can't recall now correctly but it was raising some exception when i tried. You can go ahead and try it out to see if it serves your purpose though it is not yet released by SAP.

It might be available in higher Net weaver system & not in others. I had it in SRM system.

Give it a try and let us know your feedback.

PS: For our issue, SAP suggested to use Adobe LiveCycle (3rd party - separate license) & we implemented that to solve our purpose.

Former Member
0 Kudos

Hi there,

I have a similar issue, trying to convert a Word Doc into PDF.

While using the function RSPO_DOCXPS_CREATEPDF the exepction

"Error: Merge parts of the docx" occurs

Unfortunately there's absolutely no documentation on this function. Has anybody any idea what this exception means?

Thanks!

0 Kudos

message directly from SAP stated that they do not continue the development with this FM and it should be considered obsolete. We workarounded this requirement by creating a separate java webservice, which is capable of doing quite a good job. Now we are planning in changing the solution to implement a separate server (Tomcat maybe) with Open office installed and a service will run there, which will probably solve the issue permanently.

0 Kudos

implementing a separate server for few documents seems to be a little oversized for us 😉

But Thanks for your reply!

0 Kudos

it is almost for every requirement, which is based on a work (conversion) with an open format. Shame on SAP it does not provide a clear solution.