12 Replies Latest reply: May 15, 2014 9:53 AM by Dee Moore RSS

    monarch won't create PDF file

    Stan Truman

      I was wondering why the below script won't create the PDF file that I have named.

       

      The director is empty and I thought it would create it without the files being present.

       

      The other scripts I have for excel work fine updating them, but the excel files were already created when I wrote the script.

       

      monarch /rpt:"d:closed poPRINTR15246375.txt" /mod:"D:mo bid actconverted bid actmorning models id act pdf report.xmod" /exp:"D:mo bid actconverted bid actconverted bid act30076.pdf" /window

       

      Thanks

       

      Stan

        • monarch won't create PDF file
          Grant Perkins

          Stan,

           

          Does the command really end with /window or are you saying it does not work for creating anything, table, summary or anything at all?

           

          Does everything work if you manually export from within Monarch?

           

          Have you considered setting up your export(s) as project exports which would make the script somewhat shorter and should allow it to work just as the project export does? (assuming it does work ....)

          HTH.

           

           

          Grant

           

          [size="1"][ June 25, 2007, 06:48 PM: Message edited by: Grant Perkins ][/size]

          • monarch won't create PDF file
            Dee Moore

            Hi Stan,

             

            In the Help Files, go to Chapter 9-Monarch Command Lines, Overview.

             

            /window probably should have been written as

            /[window]

             

            If you read the description, it instructs you to use

            /R

            /T

            or

            /S

            as a switch depending on which window you want to export (Report, Table, or Summary).

             

            /window is not a valid switch.

             

            Regards,

            Dee Moore

            Datawatch Tech Support

            • monarch won't create PDF file
              Stan Truman

              I talked to somebody in support and they don't think I can run a batch file and convert the text file to a pdf with out setting up a table. I find it interesting that if I load the text file and then create a template with nothing but the page header checked, it breaks the report up into pages. If I then leave it on report and then export it, you can export it to a PDF (default) with what ever file name you would like. I have about 250 text files that I wanted to convert every week to a pdf file and I was hoping this might do it using a batch file.

               

              I'm opened to any ideals that some of you might have. I was also wondering about some undocumented switches that might work. Also I want to thank the suppot department for calling me back so quick.

               

              Stan

              • monarch won't create PDF file
                Grant Perkins

                Stan,

                 

                It's not something I have needed to do so my exposure to this is limited but I would have thought that using the /R qualifier to specify the Report screen should have worked for you. Either that or set it up as an Export Project.

                 

                As for a table, yep, I would guess that a table is a fundamental part of ensuring success but it only needs a simple model to capture every line as a field or, as you have already done it seems, identify the page break point you want to set.

                 

                There are benefits to doing more of course, as the Help file points out such as configuring the tree view for the report after modelling, which will then provide bookmarks in the pdf file.

                 

                HTH.

                 

                 

                Grant

                • monarch won't create PDF file
                  Dee Moore

                  Hi,

                   

                  I don't see the problem. This works very nicely for me using Monarch V9 Pro:

                   

                  [font="courier"] "C:Program FilesMonarchMonarch.exe" "C:Program FilesMonarchReportsclassjan.prn" "C:Program FilesMonarchModelsExpPDF.xmod" "C:Program FilesMonarchExportExpPDF.pdf" /R /font[/quote]In my Model I created an empty Detail and a Page Header Template.

                   

                  Regards,

                  Dee Moore

                  Datawatch Tech Support

                  • monarch won't create PDF file
                    Data Kruncher

                    Stan,

                     

                    To be clear, do you want to compile the 250 or so text files into a single PDF file, or do you want 250 PDF files, one for each text file?

                     

                    And if no text files exist within the folder at the time the batch file is run, you still want a blank PDF file output, correct?

                     

                    Kruncher

                    • monarch won't create PDF file
                      Stan Truman

                      Well Dee, I tried and it runs but won't create the PDF files. Below is a copy of my Bat file.

                       

                      cdprogram filesmonarchprogram

                       

                      "monarch.exe" "D:mo bid actPRINTR15246375 (13).txt" "D:mo bid actmorning models idactpdf.xmod"

                      "D:mo bid actconverted bid act47503.xls" /R

                       

                       

                      d:wait 1

                       

                      "monarch.exe" "D:mo bid actPRINTR15246375 (2).txt" "D:mo bid actmorning models idactpdf.xmod"

                      "D:mo bid actconverted bid act46971.xls" /R

                       

                       

                      d:wait 1

                       

                      I added the wait so it wouldn't run so fast. I created a blank detail and a page header just like you suggested and it looks like it runs but nothing is in the folder.

                       

                      Also I want to create separate PDF files out of each text file.

                       

                      When its finished, I will have 250 separate PDF files that I can link to from a webpage.

                       

                      I really appreciate the help you guys are giving me.

                       

                      Dee, Do you think it wouldn't work because of me using a TXT file instead of a PRN?

                       

                      Stan

                      • monarch won't create PDF file
                        Stan Truman

                        Well everybody,

                         

                        I found a mistake and corrected the bat file. It now makes PDF's. I went back to look and I had the output file extension set as a xls. Thats what happens when you start copying stuff from one file to the other trying to save some time.

                         

                        I will try running the 250 files and let everybody know what happens. Again, you guys are the greatest.

                         

                        Stan

                        • monarch won't create PDF file
                          Stan Truman

                          I ran some files to test it and it creates them fine. I started opening them up with acrobat to view them and the only thing that is in the file is Row numbers on the left hand side. Dee could you open one of your files to see if converted it the same way?

                           

                          Stan

                          • monarch won't create PDF file
                            Data Kruncher

                            Stan,

                             

                            In the Table window, click the Page Setup icon and turn off the option for showing the row numbers.

                             

                            You'll also find the margin and orientation options there if you need to change either of those as well.

                             

                            Kruncher

                            • monarch won't create PDF file
                              Stan Truman

                              I got the row numbers turned off, but

                              there is NO DATA on the sheet. It's completely empty of anything.

                               

                              At least we have gotten a PDF file out of it even though its blank. 

                               

                              Stan

                              • monarch won't create PDF file
                                Dee Moore

                                Hi,

                                 

                                Let's clarify this:

                                 

                                From Monarch V9 you have the ability to export the Report (input file) from the Report Window, the Table(s) from the Table Window, or the Summary(s) from the Summary Window.

                                 

                                If exporting the Report as a PDF from the Report Window, there should be no associated row numbers involved unless they are actually in the Input File. Page Setup options are limited. The Report File should export as a PDF and look exactly the same in Adobe as it does in Monarch Report Window.

                                The switch, /R, is used here.

                                 

                                If exporting from the tabular data from the Table Window as a PDF, the Page Setup Options may be used to alter the display of the tabular data (grid lines, row numbers, etc.).

                                The switch, /T, is used here.

                                 

                                Same applies for the Summary Window as the Table Window...

                                The switch, /S, is used here.

                                 

                                In addition, if exporting multiple Tables/Summaries/Filters/Sorts, Project Exports should be created, saved in the Model and saved as a Project.

                                 

                                The Command Line will then run the Project, change the input file if necessary, and Export according to the Project Export instructions.

                                The switch, /px:[project export name]

                                or

                                /pxall, is used here.

                                 

                                The important steps are to make sure the paths are correct, the syntax is correct and the formats are correct.

                                 

                                I hope this is a little more helpful.

                                 

                                Dee Moore

                                Datawatch Tech Support

                                 

                                Sorry, I meant to address the issue of creating seperate PDF files from the Page Breaks:

                                 

                                You will not be able to Export from the Report Window in Monarch to individual PDF files based on the Page Breaks created in Monarch.

                                 

                                You may, however, create Filters for each Page and set up a Project Export to export All Filters as Files in Folder.... with the PDF extension. This would need to be saved and run via the Command Line as a Project.

                                 

                                DM

                                 

                                [size="1"][ June 28, 2007, 02:54 PM: Message edited by: Dee Moore ][/size]