i know how to render it in webapp but i'm supposed to generate pdf through an api call , so i need to send url of the pdf generated instead of the pdf itself ( thats what the mobile developer is asking for ) , is there any way to do it ?

like:

```
respond_to do |format|
    format.pdf do
      pdf = CustomCertificatePdf.new(current_user, tutorials)
      url = pdf.link
      # send_data pdf.render, filename: "custom_certificate_#{current_user.first_name.downcase}_#{current_user.last_name.downcase}.pdf",
                # type: "application/pdf",
                # disposition: "inline"
      render :json => {url: url}
    end
  end

```

even your slight hint will be appreciated , thanks :)