Comments (10)
error in version v0.0.0-20210316172528-f0a07eb93909, which also leads to a fall. occurs less frequently than the previous error in latest version
uncaught error: invalid key in dict
from go-fitz.
Does that happen with all documents or you have only some that are problematic? In bindings, errors are not "caught", if that is something internal to mupdf I cannot help.
from go-fitz.
https://github.com/ArtifexSoftware/mupdf/blob/master/source/pdf/pdf-xref.c#L2280
https://github.com/ArtifexSoftware/mupdf/blob/master/source/fitz/error.c#L153
from go-fitz.
in doc mupdf. it seems your wrapper doesn't have this processing.
will it be difficult for you to add this?
All functions you call should be guarded by a fz_try block to catch the errors, or the program will call exit() on errors. You don't want that.
from go-fitz.
Hello. have any ideas how you can fix this?
from go-fitz.
I was not able to reproduce with files I usually use for testing. I don't have time to mess with this currently, also, if you or someone else can fix this, I accept PRs.
from go-fitz.
I think the only way of solving this problem is using Go as a simple glue layer instead of directly interacting with the library. I don't think it's possible at all to use MuPDF try/catch mechanism directly with Go.
I've been working on a wrapper of MuPDF with Go that is very specific for the company that I'm working for, but it may give some ideas: https://github.com/nitro/lazypdf
from go-fitz.
hello @diegobernardes. I saw your library, but it's not entirely clear to me how to install it, which I described in this issue: Nitro/lazypdf#51
from go-fitz.
Closing this in favor of #57.
from go-fitz.
This should be fixed in f15918d.
from go-fitz.
Related Issues (20)
- getting crash for some pdf format HOT 1
- start program HOT 2
- undefined: fitz.New HOT 3
- fitz is not importing correctly HOT 2
- centos alpine build faild HOT 5
- Linux platform, when PDF is invalid
- Error when convert PDF to Image HOT 3
- Out of Memory issues with frequent requests HOT 6
- libmupdf_linux_amd64.a error HOT 8
- Implement Text Extraction in PyMuPdf Fitz Layout Mode HOT 4
- how to build mupdf static library in window platform HOT 10
- cannot find builtin CJK font HOT 1
- doc.HTML() can it support <table> <tr> <td>? HOT 1
- linux compilation error HOT 3
- linux ubuntu build fail HOT 5
- Makes discord/lilliput segfault HOT 2
- fitz is empty HOT 2
- How to build docker with this package?
- GCC 12.2 Support HOT 10
- Is it possible to add PDF splitting and merging functions? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-fitz.