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: 

Convert PDF via CL_IGS_IMAGE_CONVERTER

Former Member
0 Kudos

Hey ho,

is it possible to convert a PDF using the class CL_IGS_IMAGE_CONVERTER?

I know, there are several other FM's out there, that could, but Task is it, to do it with with this class...

13 REPLIES 13

UweFetzer_se38
Active Contributor

Convert to what?

Why not just try it and report the result here 😉

bertrand_delvallee
Active Participant
0 Kudos

Hello,

If I have to do that I will probably use a virtual printer to generate an image from the PDF file. Then import that image file in SAP to convert it (if needed) with CL_IGS_IMAGE_CONVERTER.

I'm not aware that you can "print a PDF" into an image file with a pure ABAP flow (in a reasonable amount of time and effort).

Best regards

Bertrand

0 Kudos

The Thing is, there should be a preview of that PDF, after uploading it into SAP.

0 Kudos

Just to preview the PDF? Then I'd first try the suggestions given to your other questions at " Preview a PDF out of an internal table "

0 Kudos

After a discussion with my Team, they said, i have to convert a PDF to an Image-File... But after hours of searching, i think, this isn't possible ^^

0 Kudos

We want to generate a Thumbnail for uploaded PDF's

0 Kudos

I fear there is no other way then using external tools like Ghostscript.

0 Kudos
Yep, i think the same, anyhow, thanks for your help 🙂

0 Kudos

Hi,

I don't know how you upload PDF in SAP but may be you can have a program with 2 fields in selection screen :

- PDF File

- Preview image File

And store both (with a shared id for example).

User will just have to perform a "Print screen" of its PDF before sending it. That's not ideal but it's reasonable.

Best regards

Bertrand

0 Kudos

Thanks Bertrand, thats possible but i dont think, we could Code it so. The effort is to big for the Users.

0 Kudos

Is it possible to print an PDF as an Image? Then i could "print" it and save the printing

0 Kudos

Yes, as I said in my first message : with a virtual printer. 🙂

Google "print PDF as an Image" and you will find several ways to do it. Just pick one solution that allow you to transform a PDF in file from a command line on your OS and create an entry in SM69 to simplify calling from ABAP.

Best regards

Bertrand

Former Member
0 Kudos

Convert to an Image.

I've allready tried it, but the execute-method, it raises an runtimeerror.

I even tried to convert to jpeg, even the error appears. After that, i had an jpeg, as big as the PDF, butnot able to open...