Skip to Content
-1

Convert PDF via CL_IGS_IMAGE_CONVERTER

Aug 16, 2017 at 01:51 PM

178

avatar image
Former Member

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...

10 |10000 characters needed characters left characters exceeded

Convert to what?

Why not just try it and report the result here ;-)

1
Former Member
Uwe Fetzer

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...

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Bertrand DELVALLEE Aug 16, 2017 at 03:38 PM
0

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

Show 10 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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
Former Member
Uwe Fetzer

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
Former Member
Former Member

We want to generate a Thumbnail for uploaded PDF's

0

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

0
Former Member
Uwe Fetzer
Yep, i think the same, anyhow, thanks for your help :)
0

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
Former Member
Bertrand DELVALLEE

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

0

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

0
Former Member

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

0