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: 

PDF form archive to PCL

w_doerner
Explorer
0 Kudos

Hey Guys,

our customer needs to print a pdf from archive out of sap with some special printer-parameters. A direct pdf-print is not possible. We need a pcl to feed the printer with the parameters. A Front-End-Print is not a solution.

I am looking for ANY solution to get a pcl form a pdf. I already tried to embed the pdf-data (as xstring) in an interactive-form, but was not successfull. "Printing" an interactive or smartforms results in pdf and pcl and would solve my problem.

Does one of you know a way to embed a pdf in a form?

Do you have any other ideas how I could serve our customer?

Thank you very much for your response - I feel little desperate right now.

Kind regards

Wolfgang

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos

Hi Wolfgang,

Maybe you could try to use an external program inside your SAP to convert your PDF to picture file. For example ghostscript is a command line tool that can do this work.

After you could insert a picture into a form ..

regards

Fred

9 REPLIES 9

FredericGirod
Active Contributor
0 Kudos

Hi Wolfgang,

Maybe you could try to use an external program inside your SAP to convert your PDF to picture file. For example ghostscript is a command line tool that can do this work.

After you could insert a picture into a form ..

regards

Fred

0 Kudos

I agreee, without ADS, you could execute an external command to call any tool that do the job (from specific tool, google it) to windows command to executer acrobat reader with

(e.g. Build a small script with AcroRd32.exe /t path "printername" "drivername" "portname", try to find correct parameter to use a FILE: printer with PDF driver, and upload back the result)

Regards,

Raymond

0 Kudos

Hey Guys,

thanks for your hints. I will try converting the pdf via presentation server, but I am not very confident about it...

I'm afraid we will have to use a third-party-product for conversation via application-server. Do you have any recommendations?

Thank you // kind regards!

Wolfgang

0 Kudos

Hi Wolfgang,

like you I didn't like the concept of using a third party. And to go in this way, if you read data from an archive, you certainly doesn't want to change the content of this data. Maybe it's an issue for your audit/quality team ? 

I'm not sure you can do everything you want, but, at your place I will propose to send the PDF file by mail to the end user, and ask it to print-it manually.

regards

Fred

0 Kudos

Hey Fred,

no, our customer does not want to change the data-types for archiving. But I can't let the users print manually:

Our customer has a solution for a secure print (with PIN) from the ESS for the payslip. This solution uses a customized device-type for printing. By creating the payslip via Form-Processes they add some parameters and things get done.

The device-type used in this scenario does not support pdf-files, but our customer wants the same print-function for epa-documents (pdfs from archive).

A real hard case, I think... Thank you for your engagement!

regards

Wolfgang

0 Kudos

So lets try the GhostScript tools.

Here there is a doc about merging PDF files, the logic is the same (using an external command) : http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/404e4dc1-a79c-2d10-a7b5-9a266dfed9cb&override...

regards

Fred

0 Kudos

Thanks! Knowing how to handle ghost-script-commands in ABAP is pretty good, I think. What I have to look for now is the correct command I think, isn't it?

Do you guys have an idea where I can find ghost-script commands to convert pdf to pcl? For jpg I already found this command:


gs -dNOPAUSE -sDEVICE=jpeg -r144 -sOutputFile=ausgabe.jpg datei

Is Ghostscript standard-software or do we have to install it manually? If yes, is it free of charge?

Sorry for this basic questions: This part of the business is absolutely new to me and our SAPAdmins are not very experienced in this printing-things, too.

Thanks!

Wolfgang

0 Kudos

you know, like you I don't know all the command possible with this kind of tool. I ask google, and I find someone else with the same problem : http://stackoverflow.com/questions/5098955/converting-pdf-to-pcl-with-ghostscript

at first, I will try it manually before doing test with SAP.

After this, I will create a Shell file (are you in Unix or Windows environment ?)

and when it works, I will call this shell script by the Abap program


Fred

0 Kudos

I supposed you don't know all commands and of course I found the same post

I just thought probably you do know the ones for pdf->pcl conversion.

That was my plan, too - reasonable approach

Thanks anyway! I will see what I can do and share my results!

Regards

Wolfgang