Loading ...
Sorry, an error occurred while loading the content.
 

ABC -> SVG -> PDF

Expand Messages
  • Guido Gonzato
    Hello, for those interested, let me report another interesting way to convert abcm2ps SVG output to PDF. Unlike wkhtmltopdf, this method is efficient and it
    Message 1 of 12 , Nov 23
      Hello,

      for those interested, let me report another interesting way to convert
      abcm2ps' SVG output to PDF. Unlike wkhtmltopdf, this method is efficient
      and it obeys the page layout. I used rsvg-convert,
      https://wiki.gnome.org/Projects/LibRsvg.

      Given a .abc test file (I used
      http://trillian.mit.edu/~jc/music/book/AbrahamMackintosh/all.abc):

      abcm2ps -c -O= -v all.abc
      ...
      Output written on all066.svg (30495 bytes)
      Output written on all067.svg (33885 bytes)
      rsvg-convert -f pdf -o all.pdf all*svg

      Et voila: all.pdf without resorting to PostScript/GhostScript!

      Now, my question: can command-line abc2svg produce .svg files, like
      abcm2ps does? In that case, we could use something like:

      abcnode -v all.abc > all.svg

      Cheers,
      Guido =8-)

      --
      Guido Gonzato, PhD <guido.gonzato at gmail.com>
      Geologist, GNU/Linux sysadmin. Rationalist.
      "If you think education is expensive, try ignorance."
      -- Derek Bok
    • rlwalker2
      I use SumatraPDF (Windows) which handles both PS and PDF. abcm2ps creates the PS file that I just save as a PDF file without leaving the program. I m
      Message 2 of 12 , Nov 24
        I use SumatraPDF (Windows) which handles both PS and PDF.  abcm2ps creates the PS file that I just save as a PDF file without leaving the program.

        I'm currently using the ABC2SVG online program and have been able to duplicate what I create with abcm2ps.  The problem comes when I want to save what I've created as a PDF file.

        My current, disappointing kludge is to:
        - print the screen to the clipboard
        - paste the clipboard to my graphics program
        - print the graphics screen with a faux printer that creates a pdf file.

        SURELY there is a better way.

        The output is great.  The ability to print a nice copy doesn't seem quite so great..

        HELP
      • Jean-Francois Moine
        On 24 Nov 2017 08:14:33 +0000 ... Did you try the Print button of the browser? BTW, to save the ABC source in the editor, you may either click on File- Save
        Message 3 of 12 , Nov 24
          On 24 Nov 2017 08:14:33 +0000
          "rlwalker2@... [abcusers]" <abcusers@yahoogroups.com> wrote:

          > I'm currently using the ABC2SVG online program and have been able to duplicate what I create with abcm2ps. The problem comes when I want to save what I've created as a PDF file.

          Did you try the 'Print' button of the browser?

          BTW, to save the ABC source in the editor, you may either click on
          'File->Save file' of the editor, or do a 'right button' click in the
          source area, 'Select All' and copy/drag the selection to anywhere you
          want.

          --
          Ken ar c'hentañ | ** Breizh ha Linux atav! **
          Jef | http://moinejf.free.fr/
        • Richard Walker
          The file - save as works fine for the source and include abc files The browser print works, BUT, includes all the windows on the screen. My interest is just
          Message 4 of 12 , Nov 24
            The file - save as works fine for the source and include abc files
            The browser print works, BUT, includes all the windows on the screen.  My interest is just printing the sheet music window.
            I'll keep experimenting.  In general I really like the "do everything in one place with your browser" idea.

            On Fri, Nov 24, 2017 at 3:20 AM, Jean-Francois Moine moinejf@... [abcusers] <abcusers@yahoogroups.com> wrote:
             

            On 24 Nov 2017 08:14:33 +0000
            "rlwalker2@... [abcusers]" <abcusers@yahoogroups.com> wrote:

            > I'm currently using the ABC2SVG online program and have been able to duplicate what I create with abcm2ps. The problem comes when I want to save what I've created as a PDF file.

            Did you try the 'Print' button of the browser?

            BTW, to save the ABC source in the editor, you may either click on
            'File->Save file' of the editor, or do a 'right button' click in the
            source area, 'Select All' and copy/drag the selection to anywhere you
            want.

            --
            Ken ar c'hentañ | ** Breizh ha Linux atav! **
            Jef | http://moinejf.free.fr/


          • Jean-Francois Moine
            On Fri, 24 Nov 2017 12:31:05 -0600 ... This should be a browser problem. Which one are you using? -- Ken ar c hentañ | ** Breizh ha Linux atav! ** Jef
            Message 5 of 12 , Nov 25
              On Fri, 24 Nov 2017 12:31:05 -0600
              "Richard Walker rlwalker2@... [abcusers]" <abcusers@yahoogroups.com> wrote:

              > The browser print works, BUT, includes all the windows on the screen. My
              > interest is just printing the sheet music window.

              This should be a browser problem. Which one are you using?

              --
              Ken ar c'hentañ | ** Breizh ha Linux atav! **
              Jef | http://moinejf.free.fr/
            • Nadarajah Thirugnanasothy
              In Chrome printing works fine. (Tried with a small abc  file)Click on three dots on the top right/print. From: Jean-Francois Moine moinejf@free.fr
              Message 6 of 12 , Nov 25
                In Chrome printing works fine. (Tried with a small abc  file)
                Click on three dots on the top right/print.


                From: "Jean-Francois Moine moinejf@... [abcusers]" <abcusers@yahoogroups.com>
                To: abcusers@yahoogroups.com
                Sent: Saturday, 25 November 2017, 12:10
                Subject: Re: [abcusers] Re: ABC -> SVG -> PDF

                 
                On Fri, 24 Nov 2017 12:31:05 -0600
                "Richard Walker rlwalker2@... [abcusers]" <abcusers@yahoogroups.com> wrote:

                > The browser print works, BUT, includes all the windows on the screen. My
                > interest is just printing the sheet music window.

                This should be a browser problem. Which one are you using?

                --
                Ken ar c'hentañ | ** Breizh ha Linux atav! **
                Jef | http://moinejf.free.fr/


              • Richard Walker
                I have them all. I ll experiment. On Sat, Nov 25, 2017 at 6:48 AM, Nadarajah Thirugnanasothy ... I have them all.  I ll experiment. On Sat, Nov 25, 2017 at
                Message 7 of 12 , Nov 25
                  I have them all.  I'll experiment.

                  On Sat, Nov 25, 2017 at 6:48 AM, Nadarajah Thirugnanasothy vnthiru@... [abcusers] <abcusers@yahoogroups.com> wrote:
                   

                  In Chrome printing works fine. (Tried with a small abc  file)
                  Click on three dots on the top right/print.


                  From: "Jean-Francois Moine moinejf@... [abcusers]" <abcusers@yahoogroups.com>
                  To: abcusers@yahoogroups.com
                  Sent: Saturday, 25 November 2017, 12:10
                  Subject: Re: [abcusers] Re: ABC -> SVG -> PDF

                   
                  On Fri, 24 Nov 2017 12:31:05 -0600
                  "Richard Walker rlwalker2@... [abcusers]" <abcusers@yahoogroups.com> wrote:

                  > The browser print works, BUT, includes all the windows on the screen. My
                  > interest is just printing the sheet music window.

                  This should be a browser problem. Which one are you using?

                  --
                  Ken ar c'hentañ | ** Breizh ha Linux atav! **
                  Jef | http://moinejf.free.fr/



                • Jean-Francois Moine
                  On Fri, 24 Nov 2017 08:29:35 +0100 ... abc2svg does not do page formatting as abcm2ps. abcm2ps -v creates one SVG file per page. The images contain the tunes
                  Message 8 of 12 , Nov 28
                    On Fri, 24 Nov 2017 08:29:35 +0100
                    "Guido Gonzato guido.gonzato@... [abcusers]" <abcusers@yahoogroups.com> wrote:

                    > for those interested, let me report another interesting way to convert
                    > abcm2ps' SVG output to PDF. Unlike wkhtmltopdf, this method is efficient
                    > and it obeys the page layout. I used rsvg-convert,
                    > https://wiki.gnome.org/Projects/LibRsvg.
                    >
                    > Given a .abc test file (I used
                    > http://trillian.mit.edu/~jc/music/book/AbrahamMackintosh/all.abc):
                    >
                    > abcm2ps -c -O= -v all.abc
                    > ...
                    > Output written on all066.svg (30495 bytes)
                    > Output written on all067.svg (33885 bytes)
                    > rsvg-convert -f pdf -o all.pdf all*svg
                    >
                    > Et voila: all.pdf without resorting to PostScript/GhostScript!
                    >
                    > Now, my question: can command-line abc2svg produce .svg files, like
                    > abcm2ps does? In that case, we could use something like:
                    >
                    > abcnode -v all.abc > all.svg

                    abc2svg does not do page formatting as abcm2ps.
                    'abcm2ps -v' creates one SVG file per page. The images contain the
                    tunes and the headers/footers of the page. You may print each image
                    with any tool which understands SVG.
                    Actually, there is no abc2svg backend which does page formatting (and
                    I don't want to write one...), but it is doable...

                    --
                    Ken ar c'hentañ | ** Breizh ha Linux atav! **
                    Jef | http://moinejf.free.fr/
                  • Richard Walker
                    The %%linebreak $ works well. Is there a similar command that would result in an immediate page break?
                    Message 9 of 12 , Nov 28
                      The
                      %%linebreak $
                      works well.
                      Is there a similar command that would result in an immediate page break?

                    • Jean-Francois Moine
                      On Tue, 28 Nov 2017 09:53:25 -0600 ... %%newpage -- Ken ar c hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
                      Message 10 of 12 , Nov 28
                        On Tue, 28 Nov 2017 09:53:25 -0600
                        "Richard Walker rlwalker2@... [abcusers]" <abcusers@yahoogroups.com> wrote:

                        > The
                        > %%linebreak $
                        > works well.
                        > Is there a similar command that would result in an immediate page break?

                        %%newpage

                        --
                        Ken ar c'hentañ | ** Breizh ha Linux atav! **
                        Jef | http://moinejf.free.fr/
                      • Richard Walker
                        Bless your heart. I went through all the options and missed it ... twice. Getting old. On Tue, Nov 28, 2017 at 11:24 AM, Jean-Francois Moine moinejf@free.fr
                        Message 11 of 12 , Nov 28
                          Bless your heart.  I went through all the options and missed it ... twice.
                          Getting old.

                          On Tue, Nov 28, 2017 at 11:24 AM, Jean-Francois Moine moinejf@... [abcusers] <abcusers@yahoogroups.com> wrote:
                           

                          On Tue, 28 Nov 2017 09:53:25 -0600
                          "Richard Walker rlwalker2@... [abcusers]" <abcusers@yahoogroups.com> wrote:

                          > The
                          > %%linebreak $
                          > works well.
                          > Is there a similar command that would result in an immediate page break?

                          %%newpage

                          --
                          Ken ar c'hentañ | ** Breizh ha Linux atav! **
                          Jef | http://moinejf.free.fr/


                        • rlwalker2
                          Just tested it. When the directions say, WHEN IT IS PRINTED it means exactly that. What is displayed on the screen is tunes all in a row (each abc tune is
                          Message 12 of 12 , Nov 28
                            Just tested it.  When the directions say, "WHEN IT IS PRINTED" it means exactly that.  What is displayed on the screen is tunes all in a row (each abc tune is separated with a %%newpage).  However, when it is actually printed, I get one tune per page.
                            Thanks.
                          Your message has been successfully submitted and would be delivered to recipients shortly.