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: 

Printing binary data in PDF format

aakash_neelaperumal2
Active Participant
0 Kudos

HI all,

Any idea on how to print Binary content in a PDF format

I have read a PDF format from application server in a Binary format, I need to print the binary content on a printer in PDF format

Any help on this is appreciated <REMOVED BY MODERATOR>

Thanks

Aakash

Edited by: Alvaro Tejada Galindo on Jun 9, 2008 3:15 PM

13 REPLIES 13

manuelhildemaro_ramossanc
Active Participant
0 Kudos

Hi..u found a solution for print a binary file in format .pdf ?

Regards,

0 Kudos

has anybody found a way to PRINT binary stream directly ?

Thanks

Lars

Former Member
0 Kudos

do you know the solution for that? any help is appreciated.

Clemenss
Active Contributor
0 Kudos

Hi Aakash Neelaperumal,

a PDF binary can only be printed by a program that can create printed output from PDF file. From SAP this can be done only by using Desktop Office Integration to call ADOBE reader.

Regards,

Clemens

Former Member
0 Kudos

Hi,

are there any option to do that with a batch job? I have a list with binary pdf documents and I have to print that every day at 2:00 am

Regards,

America

OttoGold
Active Contributor
0 Kudos

Why do you insist on printing existing PDF documents through SAP? If these were created outside SAP, print them outside SAP. If these were created in SAP, then you have no problem to re-create them and print. Otto

0 Kudos

Ok Otto,

Sorry but you obviously donu2019t understand the problem that we are experiencing here. Let me try to explain to you:

Example:

You are receiving a file from external system lets say a Web Service that returns you a confirmation of a purchase (u2026 whatever airline ticket).

Keep in mind that all of this is happening dynamically, no file has been stored in any application / presentation server.

The file is being returned to you as a PDF string file. Ones you read this file in your ABAP program it is being represented in a binary format.

Looks like bunch of numbers (R21122F6565657676u2026.) very long string. Now the fun part comes in. You simply need to print this file in SAP thatu2019s it. Very simple thing to do for a million dollar ERP system right?

So the question here is how you would print a PDF file that is represented in binary format in SAP ABAP program. If you try to pass the string as a parameter to SAP Script or SmartForm it will print garbage.

Clemenss
Active Contributor
0 Kudos

Hi papick,

this may be easier than expected for a million dollar erp system:

You need a PDF printer.

When I played around with adobe interactive forms our basis guys created a new printer in SPAD with

Device Attributes

Device Type PDF1

Device Class Stabdard Printer

location PDF-Frontend printer = Standard printer for workstation

Access Method

Host Spool Access Method FF

Host printer PDF

Then need some expremimenting with Functions

RSPO_OUTPUT_DEVICEDATA Spool Output Control of an Internal Table with Formatted Data

or something alike (see function group SPOD)

Then you should be able to create an entry in spooler (SP01) with spool request type adobe pdf document.

Sorry, I don't have this problem, thus I did not check out the details yet.

But I'm convinced it should work that way because the ADS server creates a complete PDF binary and it can be printed using the above described printer - actually a HP Laserjet V was configured as frontend printer and it can print the pdf.

Regards,

Clemens

0 Kudos

Clemens -

Thank you. maybe you up to something goo.. I will try this and will report.

Best regards.

0 Kudos

> Then you should be able to create an entry in spooler (SP01) with spool request type adobe pdf document.

It can only print if you have a printer which accepts PDF format. Most of printers don't accept this native format, they usually accept PCL or PostScript (and of course the many other manufacturer proprietary languages)

> But I'm convinced it should work that way because the ADS server creates a complete PDF binary and it can be printed using the above described printer - actually a HP Laserjet V was configured as frontend printer and it can print the pdf.

I have looked over how ADS works in depth. In fact, ADS sends back 2 files (to simplify): the PDF binary, and a file corresponding to the language of the printer you have requested (currently, it supports PCL, PostScript, ...), so that it can be printed. It's ADS which converts PDF to the printer language, using XDC files (do not confuse with BC-XDC from SAP). The XDC files can be edited using an Adobe software, that SAP also provides for free.

0 Kudos

Clemens

I checked into what you said and it's a joke. at leas for my level of understanding. The function module that you suggested requires you to format the input table containing ready and complete printer data. It must contain a correct leader, character set, escape sequences, trailer and so on. The table lines are sent one after the other without a separator to the output device.

I tried to do this with PCL commands in SAP SCRIPT and could not get it to work. Anyway unless you know all this low level printer commands and know how to format them, then maybe it will work.

This is same probelm i have posted in the other forum, on how to print GIF Graphic strings.

Clemenss
Active Contributor
0 Kudos

Papick,

I am sorry, please accept my apologies.

I was wrong (again) expecting something would go smooth with SAP.

I decided to stop my ADOBE/SAP related activities and wait until the SAP integration of ADOBE has reached a state that makes sense to use.

Regards

Clemens

0 Kudos

Hi,

You can refer the below link where I have just now posted a possible solution & see whether that helps.

Regards,

Gokul