MP3 and WAV support for asciidoctor-pdf

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

MP3 and WAV support for asciidoctor-pdf

Tom Swan
Does anybody know how to embed a link to an audio file in either MP3 or WAV formats in a PDF document? The following line in my source (.adoc) file works as expected for asciidoctor HTML5 output:

  audio::audiofilename.mp3[options="controls"]

However, attempting to create a PDF with asciidoctor-pdf using a command such as:

  asciidoctor-pdf -b pdf -a allow-uri-read=true docfilename.adoc

fails on that same command with:

  asciidoctor: WARNING: conversion missing in backend pdf for audio

Is there a solution so an audio link works in PDF files similarly to how it does in HTML5? I don't want to require people to download the file, which I know works. Instead, I would like to link to the audio file for playback while viewing the PDF document -- by clicking a playback button for example. Possible?

Thanks.

Tom
www.tomswan.com
Reply | Threaded
Open this post in threaded view
|

Re: MP3 and WAV support for asciidoctor-pdf

ciampix
On Sat, Jul 02, 2016 at 01:13:58PM -0700, Tom Swan [via Asciidoctor :: Discussion] wrote:

>
>
> Does anybody know how to embed a link to an audio file in either MP3 or WAV
> formats in a PDF document? The following line in my source (.adoc) file
> works as expected for asciidoctor HTML5 output:
>
>   audio::audiofilename.mp3[options="controls"]
>
> However, attempting to create a PDF with asciidoctor-pdf using a command
> such as:
>
>   asciidoctor-pdf -b pdf -a allow-uri-read=true docfilename.adoc
>
> fails on that same command with:
>
>   asciidoctor: WARNING: conversion missing in backend pdf for audio
>
> Is there a solution so an audio link works in PDF files similarly to how it
> does in HTML5? I don't want to require people to download the file, which I
> know works. Instead, I would like to link to the audio file for playback
> while viewing the PDF document -- by clicking a playback button for example.
> Possible?
>
> Thanks.
>
> Tom

I have seen pdf created for English lessons (Oxford University Press)
with links to mp3 (audio) and avi (video) files that worked with acrobat
reader (opened automatically with vlc) and other pdf readers even under
Linux... that feature would be very appreciated, thanks.

Regards,

--


Marco Ciampa

I know a joke about UDP, but you might not get it.

------------------------

 GNU/Linux User #78271
 FSFE fellow #364

------------------------

Reply | Threaded
Open this post in threaded view
|

Re: MP3 and WAV support for asciidoctor-pdf

mojavelinux
Administrator
In reply to this post by Tom Swan
Tom,

I was not aware that PDFs supported multimedia (sound & video). Sure enough, the Adobe Reader claims to support it.

https://helpx.adobe.com/acrobat/using/playing-video-audio-multimedia-formats.html

I also found some references in the PDF specification, but no specifics.

I'm not sure that Prawn supports creating this type of object though, which would have to be true in order for us to be able to include it.

I think the best approach right now is for us to simply include a link in the PDF to the audio. We can at least do that much. I've filed an issue:


If someone is able to demonstrate how to add multimedia to a PDF using Prawn, then we can port that behavior to Asciidoctor PDF.

Cheers,

-Dan

On Sat, Jul 2, 2016 at 2:13 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Does anybody know how to embed a link to an audio file in either MP3 or WAV formats in a PDF document? The following line in my source (.adoc) file works as expected for asciidoctor HTML5 output:

  audio::audiofilename.mp3[options="controls"]

However, attempting to create a PDF with asciidoctor-pdf using a command such as:

  asciidoctor-pdf -b pdf -a allow-uri-read=true docfilename.adoc

fails on that same command with:

  asciidoctor: WARNING: conversion missing in backend pdf for audio

Is there a solution so an audio link works in PDF files similarly to how it does in HTML5? I don't want to require people to download the file, which I know works. Instead, I would like to link to the audio file for playback while viewing the PDF document -- by clicking a playback button for example. Possible?

Thanks.

Tom



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/MP3-and-WAV-support-for-asciidoctor-pdf-tp4811.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: MP3 and WAV support for asciidoctor-pdf

Tom Swan

Dan,

Thank you for your quick reply. It would be great to find a solution -- one more way maybe for pdf viewers and browsers to become more compatible? I'll just avoid play buttons in pdfs for now.

PS: Every page in my site is now generated by asciidoctor! I use it now more than ever. Thanks for your efforts to make it better!

Tom

On July 2, 2016 at 5:23 PM "mojavelinux [via Asciidoctor :: Discussion]" <[hidden email]> wrote:

Tom,

I was not aware that PDFs supported multimedia (sound & video). Sure enough, the Adobe Reader claims to support it.

https://helpx.adobe.com/acrobat/using/playing-video-audio-multimedia-formats.html

I also found some references in the PDF specification, but no specifics.

I'm not sure that Prawn supports creating this type of object though, which would have to be true in order for us to be able to include it.

I think the best approach right now is for us to simply include a link in the PDF to the audio. We can at least do that much. I've filed an issue:


If someone is able to demonstrate how to add multimedia to a PDF using Prawn, then we can port that behavior to Asciidoctor PDF.

Cheers,

-Dan

On Sat, Jul 2, 2016 at 2:13 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Does anybody know how to embed a link to an audio file in either MP3 or WAV formats in a PDF document? The following line in my source (.adoc) file works as expected for asciidoctor HTML5 output:

  audio::audiofilename.mp3[options="controls"]

However, attempting to create a PDF with asciidoctor-pdf using a command such as:

  asciidoctor-pdf -b pdf -a allow-uri-read=true docfilename.adoc

fails on that same command with:

  asciidoctor: WARNING: conversion missing in backend pdf for audio

Is there a solution so an audio link works in PDF files similarly to how it does in HTML5? I don't want to require people to download the file, which I know works. Instead, I would like to link to the audio file for playback while viewing the PDF document -- by clicking a playback button for example. Possible?

Thanks.

Tom



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/MP3-and-WAV-support-for-asciidoctor-pdf-tp4811.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/MP3-and-WAV-support-for-asciidoctor-pdf-tp4811p4813.html
To unsubscribe from MP3 and WAV support for asciidoctor-pdf, click here.
NAML
www.tomswan.com
Reply | Threaded
Open this post in threaded view
|

Re: MP3 and WAV support for asciidoctor-pdf

mojavelinux
Administrator

On Sat, Jul 2, 2016 at 6:04 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
one more way maybe for pdf viewers and browsers to become more compatible?

I wouldn't hold my breath. PDFs really are for print. Browsers are for multimedia. It's enough of a challenge to get browsers to be consistent. It's an even longer road to get PDF readers to be consistent.

PS: Every page in my site is now generated by asciidoctor! I use it now more than ever. Thanks for your efforts to make it better!

You're most welcome. Great to hear it!

Cheers,
 
-Dan

--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux