Git Product home page Git Product logo

Comments (5)

ffreality avatar ffreality commented on June 26, 2024

I can expose HPDF_STATUS to show if PDF created or not with its details.
But I don't think just checking directory with UE in function is a good solution.
Because users can expect automatic actions from plugin.
These kinds of validations should be done from users.

from ff_libharu.

F1nansist avatar F1nansist commented on June 26, 2024

Bool return value is not fair in this case. It return True even PDF is not created because of invalid path

from ff_libharu.

ffreality avatar ffreality commented on June 26, 2024

No, I am agree with you about return value. I will change it. I say I just won't use unreal's api to check folders.
Return value will be bool + string error code based on HPDF_RESULT.
If path is not avaible, it will return false + "4119 or 1017"

I will look at how can I give a more meaningful outcode than integer based codes.

And I said users should check their path, because they will decide what will be next step if there is a path problem ?
if they detect any problem, they can create that path, they can save pdf to a default path or they can throw an error.

from ff_libharu.

F1nansist avatar F1nansist commented on June 26, 2024

I agree with you in this case but in my case i should create path by myself so i will use unreal for this purpose. Thank you for fast answer

from ff_libharu.

ffreality avatar ffreality commented on June 26, 2024

okay done and pushed.

If there is an error (not just paths but anything), it won't return true and there is an OutCode string output to say you what's going on.

OutCode is a hexademical value and you can check them from here.
https://github.com/libharu/libharu/wiki/Error-handling

but as I say before, it will be wise to do validations by yourself. Because it will just give you false and error code but not take any action to continue operation.

from ff_libharu.

Related Issues (5)

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.