The thing is the renditions work less universally than the built-in "Play a
Sound" action, so if it's at all possible I would like to do it like
that... It works, as you can see, but something goes wrong in the process
of reading the WAV file, causing a corruption. I tried playing around with
the various parameters, but couldn't solve it. Any ideas you might have
will be greatly appreciated.

On Wed, Jun 22, 2016 at 8:28 PM, Tilman Hausherr <[email protected]>
wrote:

> If it doesn't work, then "Plan B" would be to use "renditions". I got that
> to work with MP3 (by using another software that shall not be named), but
> the stackoverflow question specifically asked for ActionSound so I didn't
> try that. I could try to implement this with PDFBox if nobody comes up with
> a solution.
>
> Tilman
>
> Am 22.06.2016 um 14:44 schrieb Gilad Denneboom:
>
>> The files in question...
>>
>> Test.pdf : The original PDF file with the links
>> Test_edited.pdf : After running the code on it
>> Con leche.wav : The original 8-bit wav file used
>> Code.java : The relevant code snippet
>>
>> PS. I'm using PDFBox version 2.0.2
>> ​
>>   Code.java
>> <
>> https://drive.google.com/file/d/0B_eBFHMNjkhsbUk3R3pSaGkzTFU/view?usp=drive_web
>> >
>> ​​
>>   Test.pdf
>> <
>> https://drive.google.com/file/d/0B_eBFHMNjkhsUVhhR2NaV3JaOXc/view?usp=drive_web
>> >
>> ​​
>>   Test_edited.pdf
>> <
>> https://drive.google.com/file/d/0B_eBFHMNjkhsZDViSWdPRS1RVDQ/view?usp=drive_web
>> >
>> ​​
>>   Con leche.wav
>> <
>> https://drive.google.com/file/d/0B_eBFHMNjkhsUHBSZ3RuY3hhTVk/view?usp=drive_web
>> >
>> ​
>>
>> On Mon, Jun 20, 2016 at 6:26 PM, Gilad Denneboom<
>> [email protected]>
>> wrote:
>>
>> Hi all,
>>>
>>> I'm trying to associate a "Play Sound" action with a button field using
>>> the new PDActionSound object and the code provided by Tilman (Here:
>>>
>>> https://stackoverflow.com/questions/36749927/pdfbox-creating-sound-object-with-link-reference-to-external-mp3-or-wav-file/36753430
>>> ),
>>> and I'm getting mixed results. First of all, I'm unable to use a 16-bit
>>> WAV
>>> file, but it does work with 8-bit files. However, the files get corrupt
>>> in
>>> the process and a nasty click is added to them.
>>> Anyone experienced something like this in the past, or happens to know
>>> what could be causing it? I'm happy to share the source files, if
>>> necessary.
>>>
>>> Thanks!
>>>
>>> Gilad.
>>>
>>>
>

Reply via email to