[NEWSboard IBMi Forum]
  1. #1
    Registriert seit
    Sep 2002
    Beiträge
    110

    Question PDF Datei für E-POSTBUSINESS aufbereiten

    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

  2. #2
    Registriert seit
    Feb 2001
    Beiträge
    20.236
    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.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  3. #3
    Registriert seit
    Dec 2004
    Beiträge
    203
    Hallo.
    Auch Spooldesigner ist ein nettes "kostenpflichtiges" Tool.
    Gruß auch aus dem wahrscheinlich noch höheren Norden ...
    Ralf

  4. #4
    Registriert seit
    May 2002
    Beiträge
    2.641
    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

  5. #5
    Registriert seit
    Sep 2002
    Beiträge
    110
    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

  6. #6
    Joe is offline [professional_User]
    Registriert seit
    Mar 2001
    Beiträge
    365
    Zitat Zitat von jojoschluckfirma Beitrag anzeigen
    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

  7. #7
    Registriert seit
    Apr 2005
    Beiträge
    385
    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.

  8. #8
    Registriert seit
    May 2007
    Beiträge
    295
    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
    Greets
    Christian
    Anwendungsentwickler und ein bissal Systemoperator
    https://github.com/prsbrc
    LinkedIn

  9. #9
    Registriert seit
    Feb 2001
    Beiträge
    20.236
    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.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  10. #10
    Registriert seit
    Feb 2001
    Beiträge
    20.236
    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!.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

  11. #11
    Registriert seit
    Jul 2002
    Beiträge
    218
    Hi,

    ist es möglich das Printerfile zu ändern und den "unsichtbaren" Text bei DIN A4 z.B. erst ab Stelle 81 zu drucken?

    LG
    HaJo

  12. #12
    Registriert seit
    Feb 2001
    Beiträge
    20.236
    Kommt darauf an.
    Sicherstellen, dass PAGRTT(0) eingestellt ist, damit die Seite nicht gedreht und verkleinert wird.
    Per OVRPRTF/CHGPRTF die Breite groß genug einstellen, da sonst der Ausgabepuffer abgeschnitten wird.
    Der Drucker sollte das dann automatisch abschneiden.

    Die Idee könnte also funktionieren.
    Dienstleistungen? Die gibt es hier: http://www.fuerchau.de
    Das Excel-AddIn: https://www.ftsolutions.de/index.php/downloads
    BI? Da war doch noch was: http://www.ftsolutions.de

Similar Threads

  1. Antworten: 6
    Letzter Beitrag: 22-04-14, 14:30
  2. PC-Datei auf die AS/400 hieven
    By Kraitmeier in forum IBM i Hauptforum
    Antworten: 8
    Letzter Beitrag: 21-11-02, 09:05
  3. DSPF-Feld aufbereiten
    By GS in forum IBM i Hauptforum
    Antworten: 4
    Letzter Beitrag: 09-10-02, 12:18
  4. TIF Datei
    By Wirnitzer in forum IBM i Hauptforum
    Antworten: 2
    Letzter Beitrag: 20-02-02, 07:20
  5. Antworten: 3
    Letzter Beitrag: 29-10-01, 10:07

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • You may not post attachments
  • You may not edit your posts
  •