Warning: Undefined array key "birthday_search" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 173

Warning: Undefined array key "joindate" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 190

Warning: Undefined array key "posts" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 191

Warning: Undefined array key "posts" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 197

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212

Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585

Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212

Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585

Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212

Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585

Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212

Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585

Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212

Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585

Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212

Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585

Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212

Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585

Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 6509

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 212

Warning: Undefined array key "privacy_options" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/api/user.php on line 251

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 4998

Warning: Undefined array key "userid" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1585

Warning: Undefined array key "lastactivity" in phar:///home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb/vb.phar/library/user.php on line 1601

Warning: Trying to access array offset on value of type bool in /home/duptmor/public_html/prod.mcpressonline.com/forum/core/vb5/route/profile.php on line 74
TechTip: Spooled Files and PDF, Part One - MC Press Online Forums

Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

TechTip: Spooled Files and PDF, Part One

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Re:TechTip: Spooled Files and PDF, Part One

    Hello All, Can anyone help with the UNDERLINE issue? A solution is mentioned below, but I cannot seem to access it? MAny thanks in advance, Richard

    Comment


    • #32
      Re:TechTip: Spooled Files and PDF, Part One

      I added: when FCFC = '+'; WriteData('0 0 TD'+LF:7); in the WritePages section look for: // handle FCFC instruction select; insert in there.

      Comment


      • #33
        Downloadable Code

        See attached file.

        Victoria Mack
        MC Press Online
        Executive Editor
        Attached Files

        Comment


        • #34
          Originally posted by bdietz400 View Post
          I added: when FCFC = '+'; WriteData('0 0 TD'+LF:7); in the WritePages section look for: // handle FCFC instruction select; insert in there.
          I added that to the source of SCS2PDFR, just before the endsl, but now when I convert a SCS splf that contains bold, everything on/after the first bold line ends up on that 1 line. It suppresses line advancement for the rest of the splf. I haven't tried any splfs that have underlines, or bold underlines.

          Code:
                   when FCFC = '+';
                    WriteData('0 0 TD'+LF:7);
          Last edited by Ken Rokos; 01-26-2010, 06:52 PM.

          Comment


          • #35
            Has anyone found a resolution to the problem of the remaining lines of the spool file printing on one line when WriteData('0 0 TD'+LF:7); is used? This command turns off the line advancement in the PDF document. There must be another command I can use to turn the line advancement back on but I have yet to find it.

            Comment


            • #36
              Solution for being able to print Spooled files with overprinting lines

              For anyone whose has a spooled file containing overlapping lines for things such as underlining or bold text and is trying to make it work, I've been able to resolve the problem. Here's what I've done:

              I was able to find this resolution using the following PDF Reference guide:
              http://partners.adobe.com/public/dev...FReference.pdf

              First, use the code supplied by bdietz400 on 1/23/2009: Thanks bdietz400.
              In procedure WritePages add the following to the select clause after "// handle FCFC instruction"
              when FCFC = '+';
              WriteData('0 0 TD'+LF:7);
              FCFCplus = '+';

              I added the FCFCplus field to this so we can track if the FCFC field has had a "+" in it yet. If so, we need to start using line positioning commands because the PDF document will no longer automatically line advance.

              Second, add some new variables and a procedure to the top of the program:
              DLineAdvance PR
              // Misc variables ----------------------------------------------------
              DFCFCplus S 1A inz(' ')
              DLineSpacing S 2P 0


              Initialize the variable "LineSpacing" which will be based on the VertSize field:
              Add the following line right before the /end-free in the SetupPage procedure. I found 1.7 to work best for my reports, but you may need to tweek this number.
              LineSpacing = VertSpace/1.7;

              In the WritePages procedure, add the following line just below the "// handle FCFC instruction" comment:
              LineAdvance();

              At the bottom of the program, add in the LineAdvance procedure we defined and referenced earlier:
              //++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++
              // Line Advance
              //++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++
              PLineAdvance B
              DLineAdvance PI

              /free

              select;
              when FCFCplus = '+' and FCFC <> '+'
              and LineSpacing < 10;
              WriteData('0 -' + %char(LineSpacing) + ' TD'+LF:8);
              when FCFCplus = '+' and FCFC <> '+'
              and LineSpacing >= 10;
              WriteData('0 -' + %char(LineSpacing) + ' TD'+LF:9);
              endsl;

              /end-free
              PLineAdvance E


              This was the easiest way I found to get the underline and bold working so that it won't print on an additional line. Hope this is useful. This change probably won't make text bold but it will make your PDF look proper with the printing of underlines and line advancement.
              Last edited by Guest.Visitor; 08-25-2010, 07:22 AM.

              Comment


              • #37
                TechTip: Spooled Files and PDF, Part One

                ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                ** This thread discusses the Content article: TechTip: Spooled Files and PDF, Part One0
                Last edited by Guest; 03-04-2019, 03:26 PM.

                Comment


                • #38
                  TechTip: Spooled Files and PDF, Part One

                  ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                  The utility is excellent and easy. I can be streamlined in batch jobs seamlessly. After you create the CPYSPOOL file and compile the programs, you need to run this command: CHGCMD CMD(SCS2PDF) PGM(*LIBL/SCS2PDFC) so that the command runs successfully Karam Rizk rizkkr@aub.edu.lb
                  Last edited by Guest; 03-04-2019, 03:26 PM.

                  Comment


                  • #39
                    TechTip: Spooled Files and PDF, Part One

                    ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                    I agree with everyone else that this is an excellent and simple PDF converter. Be aware that the RPG programs have a compiler level issue. If you are on V5R1, you will have to slightly alter some of the code. Where you see an expression like... xOffset += BytesW; ... you will need to modify it as follows: xOffset = xOffset + BytesW; Sincere thanks to the author. Wes
                    Last edited by Guest; 03-04-2019, 03:26 PM.

                    Comment


                    • #40
                      TechTip: Spooled Files and PDF, Part One

                      ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                      Very nice utility, indeed. Thank you. However, I'd like to know why you've opted for the use of one central temporary file in QGPL and not to use QTEMP for it. I'd argue that this'll lead to problems if several users run the command at the same time. Admittedly, the chance of this to occur isn't big (the member name being derived from the system time), but why not eliminate even this slight possibility by placing the temp file in QTEMP? Thanks again. Kaj
                      Last edited by Guest; 03-04-2019, 03:27 PM.

                      Comment


                      • #41
                        TechTip: Spooled Files and PDF, Part One

                        ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                        I did not use QTEMP because in part 3 I will present a Java version that uses the same PF. But - as we know - Java cannot access QTEMP (or it cannot access as RPG does). In any case I think that it should be very difficult that a conflict between users can occur because the temporary member is given a name that is the creation time in microseconds.
                        Last edited by Guest; 03-04-2019, 03:27 PM.

                        Comment


                        • #42
                          TechTip: Spooled Files and PDF, Part One

                          ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                          Hi Mr Costagliola.. I have to agree with Mr Kaj Julius. Locks will happened as many users will be accessing the same file simultanuosly. Big spooled files (pages to 1000 above) will makes it happened. Since Java cannot access QTEMP, why not Java call RPG that will access QTEMP? regards
                          Last edited by Guest; 03-04-2019, 03:27 PM.

                          Comment


                          • #43
                            TechTip: Spooled Files and PDF, Part One

                            ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                            Dear Aaraman, as I told in the article this is a simple and free general purpose utility. For heavy-duty tasks you should consider buying a third party software like IBM InfoPrint. BTW you have all the sources of the tool and you can easily change any reference from QGPL to QTEMP, thus avoiding any possible lock. If you plan to convert big spooled files you must also increase the size of the arrays "PageObject" and "Locations", but in this case it will be better to compress data as I will explain in the next issue. Regards
                            Last edited by Guest; 03-04-2019, 03:27 PM.

                            Comment


                            • #44
                              TechTip: Spooled Files and PDF, Part One

                              ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                              I agree that this is a great utility. I downloaded the programs, compiled them, and ran the command. It places the .pdf file in the IFS *root directory. Is there an automatic way to have this placed directly into a directory that is on my pc hard drive? Thanks for any comments.
                              Last edited by Guest; 03-04-2019, 03:28 PM.

                              Comment


                              • #45
                                TechTip: Spooled Files and PDF, Part One

                                ** This thread discusses the article: TechTip: Spooled Files and PDF, Part One **
                                It is possible. For example you can immediately FTP the document created into IFS into your Windows 2000 PC. For this purpose you'll need to ensure that the PC has a ftp server running. Windows comes with one that is part of the IIS and you must configure separately. There are others servers available. Try with GuildFTP (downloadable from internet). After you have configured you FTP server on W2000 (path, permissions, user and password) from as400 issue the ftp commands: ftp your-PC User:->> Password:->> namefmt 1 lcd /home/myUserName put myPDF.pdf .... .... Another way is the struggling adventure with QNTC. If you have in your PC an account and password same as on iSeries, you can try MD ‘/QNTC/your-PC-IPaddress’ And then write directly into it. Good luck.

                                Comment

                                Working...
                                X