Blocks / Layouts Button with link to PDF

I need to add a link to a pdf to a website that uses Layouts/Blocks.
In the Button block, I can chose between Kirby (internal links) Web (only URLs) and Javascript.

The Web option rejects a link to a .pdf

Is there a fast fix or an easy way to link the PDF with Javascript?

How is the web option set up in your custom block?

    label: URL
    type: url
      location: web

Yes I see, it is set up als URL

I changed this to type:text now and added the link to the .pdf

But this results in:

The JSON response of the API could not be parsed:

There seems to be another issues. You should very well be able to put a PDF link into a URL field.

I fixed it by keeping type:text in the blueprint and changing the URL manually via FTP. (this did not work as long the type was set to url)

It’s a template made by a fellow designer, so I don’t exactly know everything that might have been adjusted.

@pixelijn The other problem seemed to be an issue with the ImageMagick implementation in the config.php
After I fixed this, there have not been any JSON issues.

Would still be insteresting to find out why the PDF link didn’t work with the URL field. In my quick test I had no issues storing a PDF link.

After I tested a .pdf link on another page, and it worked fine,
I now chaged back to type:url and the link is being accepted.
Weirdly enough, this noon, the field was red.
I double-checked the URL several timer, there was no visible error.

However, the panel was pretty bugy before I fixed the ImageMagic implementation. Must have had to do with this. Even though it seems unrelated.