Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Stirling-PDF
  3. /file-to-pdf via api

/file-to-pdf via api

Scheduled Pinned Locked Moved Stirling-PDF
2 Posts 2 Posters 786 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aflorea
    wrote on last edited by
    #1

    Hi,

    I am trying to access pdf.infragroup.ro/file-to-pdf via api but I get Cors error. If I tryin in swagger is converting the file from docx to pdf but via api it's says

    I get the following error [Error] XMLHttpRequest cannot load https://pdf.infragroup.ro/pdf-to-word?outputFormat=doc due to access control checks.
    [Error] AxiosError {stack: "AxiosError@https://app.mastergaz.ro/static/js/bund…://app.mastergaz.ro/static/js/bundle.js:319802:77", message: "Network Error", name: "AxiosError", code: "ERR_NETWORK", config: Object, …}
    (funcție anonimă) (src_sections_dashboard_file_index_js.chunk.js:4308)
    [Error] Failed to load resource: Cross-origin redirection to https://pdf.infragroup.ro/pdf-to-word denied by Cross-Origin Resource Sharing policy: Origin https://app.mastergaz.ro is not allowed by Access-Control-Allow-Origin. Status code: 302 (pdf-to-word, line 0)

    girishG 1 Reply Last reply
    0
    • A aflorea

      Hi,

      I am trying to access pdf.infragroup.ro/file-to-pdf via api but I get Cors error. If I tryin in swagger is converting the file from docx to pdf but via api it's says

      I get the following error [Error] XMLHttpRequest cannot load https://pdf.infragroup.ro/pdf-to-word?outputFormat=doc due to access control checks.
      [Error] AxiosError {stack: "AxiosError@https://app.mastergaz.ro/static/js/bund…://app.mastergaz.ro/static/js/bundle.js:319802:77", message: "Network Error", name: "AxiosError", code: "ERR_NETWORK", config: Object, …}
      (funcție anonimă) (src_sections_dashboard_file_index_js.chunk.js:4308)
      [Error] Failed to load resource: Cross-origin redirection to https://pdf.infragroup.ro/pdf-to-word denied by Cross-Origin Resource Sharing policy: Origin https://app.mastergaz.ro is not allowed by Access-Control-Allow-Origin. Status code: 302 (pdf-to-word, line 0)

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @aflorea I guess you are trying to call the API straight from your website's frontend ? If so, yes, this will trigger a CORS error.

      We don't provide a way to adjust CORS headers. Usually apps have a way to adjust this but Stirling-PDF does not have a mechanism for this.

      A workaround is to make your frontend call your website's backend and the backend proxies the call to Stirling-PDF.

      1 Reply Last reply
      1

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search