Giter Site home page Giter Site logo

Comments (6)

msokk avatar msokk commented on May 30, 2024

You are requesting the render service from front-end, right?

What about making a flag for tweaking Content-Disposition? Currently it is inline, causing the PDF to load in page, but it could be attachment, forcing the browser to download the PDF.

Hmm, actually that could be the new default, as it shouldn't affect anything other than browsers. So you could generate a regular link, which would download the PDF. Of course the latency depends on the complexity of the page, etc.

I also have a longstanding task open to add an async API, but haven't gotten to it. Planned to have a postback URL, but that's no use in FE.

from electron-render-service.

shankie-codes avatar shankie-codes commented on May 30, 2024

Yes, I'm requesting the render service from the Express front end.

Your change would make sense and certainly work for most use cases (as you say, makes sense as the default).

By async, I assume you mean something like "send a request with a callback URL to POST to". That would work well in some cases as well.

My use case is somewhat different however: I have minimal control over the AJAX client, so the response is always parsed as text. I can email you credentials for my test server if you want to have a look... or, I'm happy to accept that mine is an edge case 😄

from electron-render-service.

msokk avatar msokk commented on May 30, 2024

My use case is somewhat different however: I have minimal control over the AJAX client, so the response is always parsed as text. I can email you credentials for my test server if you want to have a look... or, I'm happy to accept that mine is an edge case 😄

I'm just wondering if you have an alternative way not to use AJAX client at all and just generate an link to a URL to download?

from electron-render-service.

shankie-codes avatar shankie-codes commented on May 30, 2024

Hey @msokk looks like you meant to post something above but didn't quite manage to!

from electron-render-service.

msokk avatar msokk commented on May 30, 2024

Fixed the quotation. You could send me the test access if it is still relevant and not a big bother.

from electron-render-service.

shankie-codes avatar shankie-codes commented on May 30, 2024

Hey @msokk , sorry, I completely forgot about this. I would still like to do this as I think it's a useful enhancement to the project. I'll email you credentials now.

from electron-render-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.