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: 

To read embedded PDF objects in .xlsx file

Former Member
0 Kudos

Hello,

We have a requirement to read the embedded PDF objects in excel 2007 file (.xlsx).

We tried doing this with the ZIP approach and found that the contents of embedded objects are saved in oleObject1.bin.

Now this .bin file is of compound file binary format and we don't know how to read contents from this file.

Does any one knows anything about this or is there any other approach to read the pdf.

Regards,

Mandeep

1 REPLY 1

Former Member
0 Kudos

We are able to extract the PDF file data from OleObject1.bin file.

Below is the code to extract the PDF file.

DATA: lv_h type xstring,

lv_object type xstring,

lv_pdf type xstring,

lv_len type i.

lv_h = '255044462D'. " where this value is binary representation of '%PDF".

FIND FIRST OCCURRENCE OF lv_h IN lv_object IN BYTE MODE MATCH OFFSET lv_len.

lv_pdf = lv_object+lv_len.

Now LV_PDF will contain PDF data in XSTRING format.

Regards,

Mandeep