4 Replies Latest reply: May 15, 2014 10:03 AM by Olly Bond RSS

    Preserving spacing when opening PDF documents in Monarch

    MonUserCJ _

      Hello all,

       

         I am trying to open a PDF document in Monarch. In the PDF document, the data is presented with consistent spacing between columns. However, in Monarch, the spacing changes, causing data from one column to appear where another column should be. I think the issue is that not every line of data has information in every column. Thus, Monarch seems to be condensing the lines where there is only, for example, two columns of data (one on the far left, one on the far right), so that the data is right next to each other. So, while the original data looks like this:

       

              Line 1:

              Line 2: ________________[Data 4]

       

       

      In Monarch, it'll look like this:

       

              Line 1:

              Line 2:  

       

       

         The fact that the fields can be blank makes defining a floating trap difficult. Does anyone know a way of converting the PDF to test that will preserve the spacing better? Otherwise, can someone give me pointers for defining a floating trap so that it won't have problems when the data in some columns is blank?

       

         Thanks.

        • Preserving spacing when opening PDF documents in Monarch
          Data Kruncher

          In the PDF Import Options dialog, there's a value for Output scale. Try using larger values than what Monarch offers as the optimal value.

           

          I often find that values up to three times that of the default improve, and sometimes[/I] completely eliminate, the problems that you're encountering.

            • Preserving spacing when opening PDF documents in Monarch
              Grant Perkins

              Further to Kruncher's suggestion, have you experimented with the MONOSPACED indicator?

               

              Bear in mind that PDF documents are, by comparison with 'old style' reports written for line printers, more likely to have been produced with 'Office' products and so are susceptible to the invasion of proportionally spaced fonts mixed with fixed width fonts. (Indeed just 'fonts' can add greatly to the complexity as part of their attempts to beautify ugly reports!)

               

              This can make life especially challenging for the PDF interpreter.

               

              I sometimes have to remind myself that the objective is simply to extract information no matter how ugly the method gets. Sometimes you have to extract what you can in a chunk and slice and dice it later in the table window using calculated fields. Potentially that is quicker and safer, being less prone, hopefully, to the vagaries of future versions of the report.

               

              HTH.

               

               

              Grant

            • Preserving spacing when opening PDF documents in Monarch
              MonUserCJ _

              Thanks for the information. I did try using the Monospace switch, as well as the Free form switch. Neither seemed to resolve the spacing issues. It's interesting to know why the spacing might be off.

                • Preserving spacing when opening PDF documents in Monarch
                  Olly Bond

                  Hello CJ,

                   

                  If you have any control over the creation of the PDFs you might be able to edit the output settings, so that a regular delimiter appears between columns in your data. Then you can use the floating trap and break it up using Lsplit() on the Column() value.

                   

                  In SAP, we can export some reports as "unconverted" spool files, others we output as "raw" and these options give us different delimiters. We're not, mercifully, having to use PDFs yet.

                   

                  Of course, if you've no control over the generation of the PDFs, then things are trickier. Have you tried printing the PDF as an XPS and using that?

                   

                  HTH,

                   

                  Olly