PDA

View Full Version : PDF Datei für E-POSTBUSINESS aufbereiten



Seiten : [1] 2

jojoschluckfirma
13-05-14, 12:25
Hallo,

wir wollen unsere Rechnungen über das System E-Postbusiness versenden, unsere Rechnungen werden in einer Spoolfile erstellt.

Hierzu müssen die Rechnungen im Format PDF erstellt werden.

Damit die Post-Software erkennen kann wann eine neue Rechnung kommt, muss eine Steuerungsinformation mitgegeben werden.
Diese soll in der ersten Zeile stehen und unsichtbar sein (Schriftfarbe weiß) Beispiel:
[[NeueRechnung]].

Das Problem ist der Parameter unsichtbar.

Wir benutzen um PDF Dateien aus unseren Listen zu erstellen den Befehl CVTSPLSTMF.
Leider kann man da nicht viel mitgeben um dieses Problem zu lösen.

Gibt es ein Toll oder wie macht man sowas????

Die Rechnungen werden in der Sprache RPG erstellt.

Ich hoffe mir kann jemand helfen, über jede Antwort die mir weiterhilft bin ich sehr Dankbar.

Schöne Grüsse aus dem hohen Norden
Jojo

Fuerchau
13-05-14, 12:46
Die SPLF muss in diesem Fall als AFPDS erstellt werden, dann kann das Color-Attribut verwendet werden.
Ab V6R1 kann man per OVRPRTF direkt eine PDF erstellen und ins IFS ablegen.
Es wird dann allerdings kein Spool mehr erstellt.

Die Alternative hierzu ist das kostenpflichtige Produkt PSF/400.
Mit diese kann man eine OUTQ als PDF-Outqueue erstellen, die dann SPLF's in PDF's konvertiert.

TheDevil
13-05-14, 12:56
Hallo.
Auch Spooldesigner ist ein nettes "kostenpflichtiges" Tool.:)
Gruß auch aus dem wahrscheinlich noch höheren Norden ...
Ralf

TARASIK
13-05-14, 13:05
Hallo,
von IBM gibt es auch ab R610 ein Lizenzprogramm. Diese ist nicht kostenpflichtig, muss aber bestellt werden.
Generating PDF Files Instead of Spooled Files



*Technote

Would you like to generate Adobe PDF documents from your applications running on IBM i and store them in stream files in an IFS directory for use with client applications? IBM i 6.1 provides a simple way to do just that.

Get Started

Before you can generate PDF files with i 6.1, there are a few prerequisites. First, Option 3 (which includes support for the IFS) and Option 33 (which includes support for the Portable Application Solutions Environment or PASE) of the operating system must be installed. In addition, the IBM licensed program Transform Services for i5/OS, 5761TS1 on V6R1M0 (R610) i5/OS or 5770TS1 on V7R1M0 (7.1) i5/OS, must have both the base option and Option 1 installed. This product is free and ships as part of the bonus pack with i 6.1 and i 7.1.




Warning: If product 5761TS1, or product 5770TS1 on a V7R1M0 (7.1) i5/OS system, is not installed when attempting to use the new support by specifying the To stream file (TOSTMF) or Workstation customizing object (WSCST) parameter on a printer file the following message will be issued:

CPFCE01: Required product option not available.
Cause: The function requires that product 5761TS1 option 01 be available to use.
Recovery: Use the Check Product Option (CHKPRDOPT) command to verify that product 5761TS1 option 01 has been properly installed on the system.


To get started generating PDF files, you need to make a couple of changes to the printer files that your applications use. To do so, use the Create Printer File (CRTPRTF ), Change Printer File (CHGPRTF ), or Override with Printer File (OVRPRTF ) commands. The device type (DEVTYPE) parameter on these commands must be set to *AFPDS because only an Advanced Function Presentation data stream (AFPDS) can be converted to PDF with the new feature. AFPDS has the additional benefit of support for AFP resources, such as overlays, page segments, and even IFS resources (using the AFPRSC keyword in DDS) such as JPG, TIFF, and GIF files.

IBM has added two new parameters to the printer file commands, accommodating the creation of PDF files. The first new parameter is the to stream file (TOSTMF) parameter. TOSTMF lets you specify with either a directory or stream file name where you want the generated PDF to go in the IFS. If you specify a directory, it must exist when your application runs. If you specify a stream file name, that file must not exist.

The second new parameter is the workstation customization object (WSCST) parameter, which lets you specify what sort of transform you want, or whether you want any transform at all. If you specify *NONE, no transform is done and the AFPDS data stream generated is written to an IFS file. A client application that uses .afp files could then access the file directly. If a workstation customization object is specified, it must have an attribute of TRANSFORM or CTXFORM (new in i 6.1). If the attribute is type TRANSFORM, the host print transform function is called to convert the data before writing it to the stream file. This function can be useful if you want a TIF or some other data stream supported by host print transform to be written to an IFS file. If the attribute is type CTXFORM, the new AFP to PDF transform converted the data to PDF before writing it to the stream file. Three new workstation customization objects with attribute CTXFORM ship with i 6.1. One of these objects can be specified for the WSCST parameter, or you can specify WSCST(*PDF) to get the default workstation customization object for generating PDF files. The three new customization objects provide varying levels of font embedding in the generated PDF file. For more information about these new workstation customization objects and their effect on the PDF file generated, search the i 6.1 Information Center for "workstation customizing object (WSCST) parameter."

Consider the Results

After changing or overriding your application printer files, you are done. When you run your application, a stream file is created in the IFS rather than a spooled file in an output queue. If you specified a stream file name in the TOSTMF parameter, that file will now exist in the IFS. If you specified a directory, a file will have been created in that directory with the first characters being either the printer file name or the alternate spooled file name, if one is specified on the printer file. The rest of the name is filled in by the operating system to ensure uniqueness. This behavior differs from that of the Infoprint Server product, which places its PDF files into the IFS and uses the job and user names to create a directory structure.

There are a couple of things to note about the PDF files generated using this feature. First, the text data in the document is preserved in standard encodings so that it is searchable. Different methods are used to preserve the text data for different languages. By default, single-byte character set (SBCS) languages are converted to Windows ANSI, which can be rendered with standard PDF fonts. The SBCS method works well for the Latin-1 languages used in the U.S., South America, and Western Europe. For double-byte character set (DBCS) languages, files reference the appropriate Adobe registered character collections and character identifier (CID) fonts. For all other languages, files must use TrueType fonts for the text (FONTNAME keyword in DDS). The *CODEPAGE or *IGCCODEPAGE parameter values can be specified for EBCDIC data or omitted for Unicode data. The TrueType font gets embedded in the PDF files with a ToUnicode CMap. If fidelity is more important than size, you can use this method for any language.

The page size of the PDF is derived from the printer file attributes without applying any Computer Output Reduction (COR), so make sure your printer file has the "correct" page size and does not rely on the COR function. If you can not specify the size, most client print drivers can still "scale-to-fit" printed output.

Look at an Example

Let us assume that you have an existing application consisting of a program (*PGM) object named MYAPP and a printer device file (*FILE) object named MYPRTF, where program MYAPP uses printer file MYPRTF to generate a spooled file that contains a report. Before calling MYAPP, issue the Override with Printer File (OVRPRTF ) command, for example:

OVRPRTF * FILE(MYPRTF) *DEVTYPE(*AFPDS)
* * * * *TOSTMF('/myapp/mypdfs') *WSCST(*PDF)

Then call the MYAPP program. Instead of generating a spooled file and placing it on an output queue, a PDF file is generated into a stream file in directory myapp/mypdfs. The name of the stream file is MYPRTFxxyyzz .pdf, where xxyyzz is determined by the operating system to ensure file name uniqueness. The file extension for the stream file is .pdf so that the file can be opened by a PDF file reader PC application that has access to the IFS directory.

Give It a Try

The i 6.1 operating system now supports generating PDF files directly from an application. It also offers support for generating AFPDS and host print transform supported data streams directly to an IFS file. If you find that you want to do more with PDF files, consider Infoprint Server for System i (5722IP1), a licensed program product (LPP) that you can try for a standard 70-day evaluation period.


Keywords: 5761SS1 5761-SS1 5761TS1 5761-TS1 R610 R611 V6R1 V6R1M0 V6R1M1 6.1 6.1.1 5770SS1 5770-SS1 5770TS1 5770-TS1 R710 R711 V7R1 V7R1M0 7.1

jojoschluckfirma
13-05-14, 13:25
Hallo,

vielen Dank für die Antworten wir fahren V5R4, es sieht so aus als müssten wir Geld in der Hand nehmen um das Problem zu lösen.
Oder hat jemand noch eine Idee????

Gruß
Jojo

Joe
13-05-14, 14:17
Hallo,

vielen Dank für die Antworten wir fahren V5R4, es sieht so aus als müssten wir Geld in der Hand nehmen um das Problem zu lösen.
Oder hat jemand noch eine Idee????

Gruß
Jojo

Hallo Jojo.

Ich habe zum automatischen Erzeugen von PDF den PDFCREATOR installiert.
Dieser wird als CA-Emulation gestartet und erzeugt PDF aus einer verbundenen OUTQ.

Gruß Joe

ExAzubi
13-05-14, 15:05
Ab V7R1 gibt es beim CPYSPLF die Möglichkeit Spools nach *PDF zu kopieren
===> CPYSPLF FILE(PRINTERF) TOFILE(*TOSTMF) JOB(999999/USER/PRINTERF) SPLNBR(1)
TOSTMF('/HOME/USER/PRINTERF.PDF') WSCST(*PDF) STMFOPT(*REPLACE)

Es werden auch AFPDS Spools unterstützt allerdings keine IPDS Spools.

prsbrc
13-05-14, 15:44
Wenn ich richtig gelesen habe dann konvertiert Ihr ja bereits Spools zu PDF mit eurem Befehl.
Somit seh ich hier ohne zukauf von Software keine Möglichkeit den Text mitzugeben außer dieser ist eben bereits im Spool gedruckt.

Grüße!
Christian

Fuerchau
13-05-14, 16:03
Auf V5R4 wird es dann doch schon schwieriger.
Ein PDF-Writer über PC5250-Drucker ist keine elegante Lösung, da der PDF-Name meist nicht dynamisierbar ist. Außerdem können die meisten Druckeremulationen kein AFPDS sondern wieder nur SCS.
Auf V5R4 gabs auch schon PSF/400 (Infoprintserver), aber ich denke nicht, dass man dies nach lizensieren kann, aber probieren kann man es ja.

Ohne Geld wird es da dann wohl eher teurer, da du das was andere entwickelt haben selber neu entwickeln musst.

Fuerchau
13-05-14, 16:07
Wenn ihr die Quellen des CVTSPLSTMF könnt ihr die doch ggf. noch anpassen.
Dann lässt sich (ähnlich des Prescribes von Kyocera) mit speziellen Sequenzen diese Information doch ausgeben und von diesem Programm dann auf Unsichtbar setzen.
Beispiel: "!HB!Irgendein versteckter Text!HE!".
Das Programm prüft nach !HB! und scannt bis !HE!.