Skip to Content

Introduction
I don’t know about your company, but mine just loves PDF documents. Maybe we are just control freaks and like the locked-in nature of a PDF document. It seems like everyone and their brother has the Adobe PDF writer application. It is also a really common request from the users to add a PDF export option to the reports that we write in SAP. Now I know that we have all the cool new Adobe Forms technology in Netweaver 04. I have been playing with that a lot lately and I plan to write some weblogs on it soon. However I want to look at something a little simpler first.

The task I set out to try and complete was setting up a simple PDF writer in our 4.6C R/3 system. I found several OSS notes that put me on the write path yet I never found where the solution was exactly laid out. Therefore I thought other people might be interested in the solution as well.

Printer Setup
First of all you will need the PDF device type in your SAP system. All systems on top of Basis (WebAS) version 46D and higher already have this device type for at least Latin-1. If you are on a release older than 46D or if you are missing the device type for your code page (some of the latest code pages were not supported until 640), have a look at OSS note 317851. It has the instructions and files necessary for installing the PDF Device type.

What I wanted was a printer ID in SAP that would convert output to PDF and send it for front end printing. On my front end, I will setup a simple generic text printer that is routed to a file instead of a printer port. Then I can create PDF files on the fly from my SAP output, similar to an Adobe Printer Driver.

The only draw back to this solution is that I must setup an output device on each workstation that will use this solution. If you want the front end printing to be fairly transparent then you want to be sure to use the same name for each front end device you setup. That way later in the SAP Printer setup we can default in that name.
image

Printer File Port
image

Printer – Generic Text
image

Next we want to go to transaction SPAD in our SAP System. Here we will setup our printer with the PDF Device Type.
image

For our access method we want to use F (Printing on Front end computer) and default in the name we gave the device on the front end.
image

Printing from SAP
Now we are ready to try and print something from SAP. I will just jump over to SE16 and print out something simple. When I put in PDF1 and hit enter, it proposes the correct name of my front end device.
image

A few seconds later I get a popup from windows asking where I want to save the file. Now this is really the only drawback to this solution. This file dialog, provided by Windows, is lacking in functionality. In such you have to be sure and end the filename in .pdf if you want the file to be recognizable as a PDF.
image

In the end you get some nice looking output that is easy to produce. Not bad for something that only takes a few minutes to setup.
image

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Scott Barden
    Hi Thomas,
    Assuming your Windows PDF writer software when installed defines a Windows printer, another way should be to define a SAP printer with device type SAPWIN and then just select the local Windows printer from the SAP print dialog.

    The benefit of this approach is that it doesn’t matter what the name, the printer should already be defined locally (depending on your PDF writing software) and presumably will offer a nicer interface for selecting the target filename.

    The disadvantage is that the ugly SAPLPD window will also popup. I wonder if there is a setting to stop that from displaying?

    Cheers,
    Scott

    (0) 
    1. Thomas Jung
      Of course for the approach I am describing, you don’t have to have any Adobe Printer drivers or writer software installed on your PC at all.  All the PDF conversion happens back on the SAP Server.

      Now when I print local, SAPLPD does open, but it doesn’t popup.  It just appears on my taskbar. 

      (0) 
      1. Scott Barden
        Yes, that is of course a very important distinction.  I assume 6.20 SAPLPD behaves differently to 6.40, or maybe it’s NT4 versus XP. Yep, still on NT4 here (sigh), think XP’ll come later in the year.
        (0) 
  2. Roger Myers
    We have been doing this for a little over a year now.

    We defined our own port, instead of using the file port. Our windows printer port is c:/temp/sap_adobe.pdf.

    The windows printer spools all print requests to this file. The draw back is that the user needs to rename the file after printing, otherwise the file will be overwritten the next time someting is printed as pdf.

    It seems to work for our users. They print the file and them go get it and do something with it.

    This approach avoids the pop-up file naming issue.

    (0) 
  3. Sylvecast T
    Thank you very much for your blog.
    But I don’t know where to access SAP PDF Writer printer, could you please tell me the path?

    Thank you very much for your help.
    Sylvecast.

    (0) 
    1. Thomas Jung Post author
      You have to setup that printer manually in windows yourself.  Just create a new printer.  When you have to choose a Port for the printer, choose FILE (Print to File).  For the Printer Driver choose Generic as the Manufacturer and Generic / Text Only as the Printer Type.
      (0) 

Leave a Reply