summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-12-05pdftoxxx: error out when even/odd selects 0 pagesKris Jurka2-3/+21
When page selection options and/or document length result in planned output of a single page, further even/odd page selection can then result in no pages being output. Error out instead of producing no output which is confusing to the user. Closes: https://gitlab.freedesktop.org/poppler/poppler/issues/815
2019-12-05[PdfToPpm] Add an option to scale before rotatecorentinfoucault2-6/+19
-scale-dimension-before-rotation
2019-12-04Update (C) of previous commitAlbert Astals Cid1-0/+1
2019-12-04Changes value of exit code on dumping signatures errorNelson Efrain A. Cruz1-3/+3
2019-12-04Fixes pdfsig exit code when dumping signaturesNelson Efrain A. Cruz1-4/+10
2019-12-04pdfinfo: improved paper size recognitionThomas Fischer1-5/+8
Paper sizes of ISO 216, A Series were originally defined in millimeters. For example, A3 is defined to be 297mm x 420mm. However, depending on source, the corresponding size in pts may vary between 1190pt and 1191pt for the longer edge. pdfinfo's formula to compute the length of the longer edge of an A3 paper determines this length to be 1191.82pt. As the error margin so far was set to 1pt, A3 papers with edge length of 1190.8pt were not recognized as A3. This patch makes the error margin depending on the paper size, setting it at 0.3% of the longer edge's length. For A3 paper, the error marging (variable 'isoThreshold') thus becomes 3.58pt. Accordingly, the threshold for 'letter' paper has been raised from 0.1pt to 1pt.
2019-12-03Fix calling a function on a null pointerAlbert Astals Cid1-13/+10
It wasn't crashing but it's defenitely undefined behaviour. Now instead of calling copy that calls the constructor we call the constructor directly, which deals fine with a null "other" to be created from Also some const
2019-12-03Add some more constAlbert Astals Cid7-90/+92
2019-12-03Make HtmlMetaVar::toString constAlbert Astals Cid2-3/+3
2019-12-03Enable modernize-loop-convertAlbert Astals Cid30-137/+107
2019-12-02enable modernize-redundant-void-argAlbert Astals Cid8-19/+19
No copyright, it's a mechanical change
2019-12-02enable modernize-use-bool-literalsAlbert Astals Cid18-40/+40
No copyright, this is a mechanical change
2019-12-02Enable modernize-use-emplaceAlbert Astals Cid4-8/+8
Not claiming copyright since it's a mechanical change
2019-12-02Enable modernize-use-equals-deleteAlbert Astals Cid9-27/+31
Not claiming copyright since the change is mechanical
2019-12-02Enable modernize-use-overrideAlbert Astals Cid68-195/+195
not claiming copyright for this since it's a mechanical change
2019-12-02Enable modernize-make-shared and modernize-make-uniqueAlbert Astals Cid5-47/+47
2019-12-01Update (C) of last commitAlbert Astals Cid2-0/+2
2019-12-01JBIG2Stream: fix leak in reset() if called several timesEven Rouault2-5/+13
JBIG2Stream::reset() currently allocates new values for the segments and globalSegments member variable. This causes a memory leak if the method is called several times, which can be triggered by the GDAL library that uses Poppler. So add a freeSegments() method where we move the related cleanup of close(), and call that method from reset() and close().
2019-12-01Move the clear for loops into a functionAlbert Astals Cid2-22/+15
And also call memset because it's clearer from "this is what i want" point of view, compiler optimizers are smart enough to convert back to a loop if needed
2019-11-30Rework Hints::readTables a bitAlbert Astals Cid1-9/+16
fail and return immediately if the length is 0 also set ok to false in a few other "failed to read table" cases
2019-11-30Improve pdftops -optimizecolorspace by implementing the CMYK to K conversion ↵William Bader1-49/+132
in more places. This fixes the conversion of the PDF in poppler/poppler#833
2019-11-30Links: Remove two unused functionsAlbert Astals Cid2-24/+0
Note: If you're one of the people using the internal API against our wishes, you can still roll out these functions yourself
2019-11-30Turn Links::links into a std::vector instead of **Albert Astals Cid2-29/+9
2019-11-29Enable modernize-deprecated-headersAlbert Astals Cid144-337/+343
2019-11-29Enable readability-string-compareAlbert Astals Cid4-17/+17
2019-11-29Enable readability-inconsistent-declaration-parameter-nameAlbert Astals Cid33-113/+119
2019-11-29Return early in operator= if we're assigning to ourselvesAlbert Astals Cid2-1/+7
Makes bugprone-unhandled-self-assignment happy
2019-11-28glib: Fix poppler_action_layer_copy function cast warningJason Crain1-1/+2
In our call to g_list_foreach, the GFunc callback type takes two arguments, but we pass the g_object_ref function, which only takes one, so the compiler warns about an incompatible function cast. Fix this by using a for loop instead of g_list_foreach.
2019-11-28glib: Fix return in poppler_page_get_text_attributes_for_areaJason Crain1-1/+1
Since this function returns a GList*, it should return nullptr on error, not FALSE.
2019-11-28glib: Use g_list_free_fullJason Crain3-23/+11
Use g_list_free_full instead of g_list_foreach followed by g_list_free. This fixes a compiler warning. The g_list_foreach function takes a "GFunc" callback, which takes two arguments, but the free functions we pass only take one argument, so the compiler warns about an incompatible cast. Using g_list_free_full fixes this because it takes a "GDestroyNotify" callback, which takes one argument.
2019-11-28Move enableFreeType out of GlobalParamsAlbert Astals Cid6-20/+8
It's now moved to pdftoppm+SplashOutputDev that were the only users
2019-11-28Some more constAlbert Astals Cid5-32/+32
2019-11-28HtmlPage::dumpComplexHeaders: Fix memory leakAlbert Astals Cid4-24/+17
We can't do const std::string htmlEncoding = HtmlOutputDev::mapEncodingToHtml(globalParams->getTextEncodingName())->toStr(); since HtmlOutputDev::mapEncodingToHtml returned a GooString that needed deletion. It's all std::strings now
2019-11-28Make GfxFont constructor protectedAlbert Astals Cid1-3/+1
You're not supposed to create a GfxFont by itself
2019-11-27Poppler 0.83.0poppler-0.83.0Albert Astals Cid4-4/+22
2019-11-27some more constAlbert Astals Cid9-37/+52
2019-11-27FontInfo: Add some constAlbert Astals Cid3-17/+17
2019-11-26Linearization: add const to functionsAlbert Astals Cid2-21/+22
2019-11-26Update (C)Albert Astals Cid1-0/+1
2019-11-26Do not recognized as linearized documents that lack a valid Linearized dictEven Rouault1-0/+2
Documents such as the one at https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19098 (under embargo at the time of writing) have the structure of the Linearized dict but lack valid integer object numbers. Poppler still manages to make some sense of that, but not recognizing such corrupted files as linearized would help the consumer (GDAL) that does admitedly nasty things around Poppler...
2019-11-24Add const to TextOutputDev & friendsAlbert Astals Cid8-182/+182
2019-11-24Remove useless virtual markers on override functionsAlbert Astals Cid3-19/+19
2019-11-24Make Stream::getKind constAlbert Astals Cid12-37/+53
2019-11-24CI: savannah git is down, use tarballsAlbert Astals Cid1-2/+3
2019-11-24Update (C) of few past commitsAlbert Astals Cid4-0/+4
2019-11-23Add some const to GfxState & friendsAlbert Astals Cid11-117/+109
2019-11-22make-glib-api-docs: switch to python3Albert Astals Cid1-1/+1
Seems to work fine and python2 is dying anyway
2019-11-22Remove Object::streamIs and Object::isStream(const char *)Albert Astals Cid1-8/+0
2019-11-22Remove Object::streamGetLineAlbert Astals Cid1-4/+0
2019-11-22Remove Object::streamLookCharAlbert Astals Cid1-4/+0