Skip to content

Commit

Permalink
feat(lib): update poppler win32 binaries from 20.12.1 to 21.01.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Jan 25, 2021
1 parent e79d991 commit a552f83
Show file tree
Hide file tree
Showing 478 changed files with 822,878 additions and 69 deletions.
21 changes: 20 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class Poppler {
__dirname,
"lib",
"win32",
"poppler-20.12.1",
"poppler-21.01.0",
"Library",
"bin"
);
break;
Expand Down Expand Up @@ -639,6 +640,12 @@ class Poppler {
* corner in pixels (image output) or points (vector output).
* @param {number=} options.cropYAxis - Specifies the y-coordinate of the crop area top left
* corner in pixels (image output) or points (vector output).
* @param {string=} options.defaultCmykProfile - If Poppler is compiled with colour management support, this option
* sets the DefaultCMYK color space to the ICC profile stored in the display profile file passed.
* @param {string=} options.defaultGrayProfile - If Poppler is compiled with colour management support, this option
* sets the DefaultGray color space to the ICC profile stored in the display profile file passed.
* @param {string=} options.defaultRgbProfile - If Poppler is compiled with colour management support, this option
* sets the DefaultRGB color space to the ICC profile stored in the display profile file passed.
* @param {string=} options.displayProfile - If Poppler is compiled with colour management support, this option
* sets the display profile to the ICC profile stored in the display profile file passed.
* @param {boolean=} options.evenPagesOnly - Generates only the even numbered pages.
Expand Down Expand Up @@ -687,6 +694,9 @@ class Poppler {
cropWidth: { arg: "-W", type: "number" },
cropXAxis: { arg: "-x", type: "number" },
cropYAxis: { arg: "-y", type: "number" },
defaultCmykProfile: { arg: "-defaultcmykprofile", type: "string" },
defaultGrayProfile: { arg: "-defaultgrayprofile", type: "string" },
defaultRgbProfile: { arg: "-defaultrgbprofile", type: "string" },
displayProfile: { arg: "-displayprofile", type: "string" },
evenPagesOnly: { arg: "-e", type: "boolean" },
firstPageToConvert: { arg: "-f", type: "number" },
Expand Down Expand Up @@ -741,6 +751,12 @@ class Poppler {
* pdftops writes hex-encoded data in Level 1 PostScript. Binary data is non-standard in Level 1
* PostScript but reduces the file size and can be useful when Level 1 PostScript is required
* only for its restricted use of PostScript operators.
* @param {string=} options.defaultCmykProfile - If Poppler is compiled with colour management support, this option
* sets the DefaultCMYK color space to the ICC profile stored in the display profile file passed.
* @param {string=} options.defaultGrayProfile - If Poppler is compiled with colour management support, this option
* sets the DefaultGray color space to the ICC profile stored in the display profile file passed.
* @param {string=} options.defaultRgbProfile - If Poppler is compiled with colour management support, this option
* sets the DefaultRGB color space to the ICC profile stored in the display profile file passed.
* @param {boolean=} options.duplex - Set the Duplex pagedevice entry in the PostScript file.
* This tells duplex-capable printers to enable duplexing.
* @param {boolean=} options.epsFile - Generate an EPS file. An EPS file contains a single image,
Expand Down Expand Up @@ -836,6 +852,9 @@ class Poppler {
const acceptedOptions = {
antialias: { arg: "-aaRaster", type: "string" },
binary: { arg: "-binary", type: "boolean" },
defaultCmykProfile: { arg: "-defaultcmykprofile", type: "string" },
defaultGrayProfile: { arg: "-defaultgrayprofile", type: "string" },
defaultRgbProfile: { arg: "-defaultrgbprofile", type: "string" },
duplex: { arg: "-duplex", type: "boolean" },
epsFile: { arg: "-eps", type: "boolean" },
fillPage: { arg: "-expand", type: "boolean" },
Expand Down
3 changes: 2 additions & 1 deletion src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ switch (platform) {
__dirname,
"lib",
"win32",
"poppler-20.12.1",
"poppler-21.01.0",
"Library",
"bin"
);
break;
Expand Down
Binary file removed src/lib/win32/poppler-20.12.1/bin/libzstd.dll
Binary file not shown.
Binary file removed src/lib/win32/poppler-20.12.1/bin/openjp2.dll
Binary file not shown.
Binary file removed src/lib/win32/poppler-20.12.1/bin/pdfimages.exe
Binary file not shown.
Binary file removed src/lib/win32/poppler-20.12.1/bin/pdftocairo.exe
Binary file not shown.
Binary file removed src/lib/win32/poppler-20.12.1/bin/poppler-cpp.dll
Binary file not shown.
Binary file removed src/lib/win32/poppler-20.12.1/bin/poppler-glib.dll
Binary file not shown.
Binary file removed src/lib/win32/poppler-20.12.1/bin/zstd.dll
Binary file not shown.
Binary file removed src/lib/win32/poppler-20.12.1/bin/zstd.exe
Binary file not shown.
12 changes: 0 additions & 12 deletions src/lib/win32/poppler-20.12.1/lib/pkgconfig/poppler-cpp.pc

This file was deleted.

12 changes: 0 additions & 12 deletions src/lib/win32/poppler-20.12.1/lib/pkgconfig/poppler-glib.pc

This file was deleted.

10 changes: 0 additions & 10 deletions src/lib/win32/poppler-20.12.1/lib/pkgconfig/poppler.pc

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
// Copyright (C) 2019 João Netto <joaonetto901@gmail.com>
// Copyright (C) 2020 Nelson Benítez León <nbenitezl@gmail.com>
// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by Technische Universität Dresden
// Copyright (C) 2020 Katarina Behrens <Katarina.Behrens@cib.de>
// Copyright (C) 2020 Thorsten Behrens <Thorsten.Behrens@CIB.de>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
Expand Down Expand Up @@ -64,6 +66,7 @@ class FormField;
class FormFieldButton;
class FormFieldText;
class FormFieldChoice;
class FormFieldSignature;
class PDFRectangle;
class Movie;
class LinkAction;
Expand Down Expand Up @@ -492,7 +495,9 @@ class AnnotAppearanceCharacs

int getRotation() const { return rotation; }
const AnnotColor *getBorderColor() const { return borderColor.get(); }
void setBorderColor(std::unique_ptr<AnnotColor> &&color) { borderColor = std::move(color); }
const AnnotColor *getBackColor() const { return backColor.get(); }
void setBackColor(std::unique_ptr<AnnotColor> &&color) { backColor = std::move(color); }
const GooString *getNormalCaption() const { return normalCaption.get(); }
const GooString *getRolloverCaption() { return rolloverCaption.get(); }
const GooString *getAlternateCaption() { return alternateCaption.get(); }
Expand Down Expand Up @@ -567,7 +572,7 @@ class AnnotAppearanceBuilder
void drawLineEndSlash(double x, double y, double size, const Matrix &m);
void drawFieldBorder(const FormField *field, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect);
bool drawFormField(const FormField *field, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect,
const GooString *appearState, XRef *xref, bool *addedDingbatsResource);
const GooString *appearState, XRef *xref, bool *addedDingbatsResource, Dict *resourcesDict);
static double lineEndingXShorten(AnnotLineEndingStyle endingStyle, double size);
static double lineEndingXExtendBBox(AnnotLineEndingStyle endingStyle, double size);
void writeString(const GooString &str);
Expand All @@ -583,6 +588,8 @@ class AnnotAppearanceBuilder
XRef *xref, bool *addedDingbatsResource);
bool drawFormFieldText(const FormFieldText *fieldText, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect);
bool drawFormFieldChoice(const FormFieldChoice *fieldChoice, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect);
bool drawSignatureFieldText(const FormFieldSignature *field, const Form *form, const GfxResources *resources, const GooString *da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect,
XRef *xref, Dict *resourcesDict);
bool drawText(const GooString *text, const GooString *da, const GfxResources *resources, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs, const PDFRectangle *rect, bool multiline, int comb, int quadding,
bool txField, bool forceZapfDingbats, XRef *xref, bool *addedDingbatsResource, // xref and addedDingbatsResource both must not be null if forceZapfDingbats is passed
bool password);
Expand Down Expand Up @@ -753,7 +760,7 @@ class Annot
void update(const char *key, Object &&value);

// Delete appearance streams and reset appearance state
void invalidateAppearance();
virtual void invalidateAppearance();

Object annotObj;

Expand Down Expand Up @@ -1412,12 +1419,14 @@ class AnnotWidget : public Annot
~AnnotWidget() override;

void draw(Gfx *gfx, bool printing) override;
void invalidateAppearance() override;

void generateFieldAppearance(bool *addedDingbatsResource);
void updateAppearanceStream();

AnnotWidgetHighlightMode getMode() { return mode; }
AnnotAppearanceCharacs *getAppearCharacs() { return appearCharacs.get(); }
void setAppearCharacs(std::unique_ptr<AnnotAppearanceCharacs> &&appearCharacsA) { appearCharacs = std::move(appearCharacsA); }
LinkAction *getAction() { return action.get(); } // The caller should not delete the result
std::unique_ptr<LinkAction> getAdditionalAction(AdditionalActionsType type);
std::unique_ptr<LinkAction> getFormAdditionalAction(FormAdditionalActionsType type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2008 Koji Otani <sho@bbr.jp>
// Copyright (C) 2009, 2018, 2019 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009, 2018-2020 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
//
Expand Down Expand Up @@ -54,13 +54,6 @@ class CMap
// Returns NULL on failure.
static CMap *parse(CMapCache *cache, const GooString *collectionA, Stream *str);

// Create the CMap specified by <collection> and <cMapName>. Sets
// the initial reference count to 1.
// Stream is a stream containing the CMap, can be NULL and
// this means the CMap will be searched in the CMap files
// Returns NULL on failure.
static CMap *parse(CMapCache *cache, const GooString *collectionA, const GooString *cMapNameA, Stream *stream);

~CMap();

CMap(const CMap &) = delete;
Expand Down Expand Up @@ -128,7 +121,7 @@ class CMapCache
// Stream is a stream containing the CMap, can be NULL and
// this means the CMap will be searched in the CMap files
// Returns NULL on failure.
CMap *getCMap(const GooString *collection, const GooString *cMapName, Stream *stream);
CMap *getCMap(const GooString *collection, const GooString *cMapName);

private:
CMap *cache[cMapCacheSize];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
// Copyright (C) 2020 Oliver Sander <oliver.sander@tu-dresden.de>
// Copyright (C) 2020 Katarina Behrens <Katarina.Behrens@cib.de>
// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by Technische Universität Dresden
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
Expand Down Expand Up @@ -203,6 +205,8 @@ class Catalog
Object *getOutline();

Object *getAcroForm() { return &acroForm; }
void addFormToAcroForm(const Ref formRef);
void removeFormFromAcroForm(const Ref formRef);

OCGs *getOptContentConfig() { return optContent; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// Copyright 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@gmail.com>
// Copyright 2018, 2019 Albert Astals Cid <aacid@kde.org>
// Copyright 2018 Oliver Sander <oliver.sander@tu-dresden.de>
// Copyright 2020 Thorsten Behrens <Thorsten.Behrens@CIB.de>
//
//========================================================================

Expand Down Expand Up @@ -90,6 +91,7 @@ class X509CertificateInfo
/* GETTERS */
int getVersion() const;
const GooString &getSerialNumber() const;
const GooString &getNickName() const;
const EntityInfo &getIssuerInfo() const;
const Validity &getValidity() const;
const EntityInfo &getSubjectInfo() const;
Expand All @@ -101,6 +103,7 @@ class X509CertificateInfo
/* SETTERS */
void setVersion(int);
void setSerialNumber(const GooString &);
void setNickName(const GooString &);
void setIssuerInfo(EntityInfo &&);
void setValidity(Validity);
void setSubjectInfo(EntityInfo &&);
Expand All @@ -116,6 +119,7 @@ class X509CertificateInfo
Validity cert_validity;
GooString cert_serial;
GooString cert_der;
GooString cert_nick;
unsigned int ku_extensions;
int cert_version;
bool is_self_signed;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
// Copyright 2019 João Netto <joaonetto901@gmail.com>
// Copyright 2020 Nelson Benítez León <nbenitezl@gmail.com>
// Copyright 2020 Marek Kasik <mkasik@redhat.com>
// Copyright 2020 Thorsten Behrens <Thorsten.Behrens@CIB.de>
// Copyright 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by Technische Universität Dresden
//
//========================================================================

Expand All @@ -46,6 +48,7 @@ class LinkAction;
class GfxResources;
class PDFDoc;
class SignatureInfo;
class X509CertificateInfo;
class SignatureHandler;

enum FormFieldType
Expand Down Expand Up @@ -143,6 +146,7 @@ class FormWidget

void createWidgetAnnotation();
AnnotWidget *getWidgetAnnotation() const { return widget; }
void setWidgetAnnotation(AnnotWidget *_widget) { widget = _widget; }

virtual void updateWidgetAppearance() = 0;

Expand Down Expand Up @@ -287,19 +291,36 @@ class FormWidgetSignature : public FormWidget
void updateWidgetAppearance() override;

FormSignatureType signatureType() const;
void setSignatureType(FormSignatureType fst);

// Use -1 for now as validationTime
SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime);

// returns a list with the boundaries of the signed ranges
// the elements of the list are of type Goffset
std::vector<Goffset> getSignedRangeBounds() const;

// creates or replaces the dictionary name "V" in the signature dictionary and
// fills it with the fields of the signature; the field "Contents" is the signature
// in PKCS#7 format, which is calculated over the byte range encompassing the whole
// document except for the signature itself; this byte range is specified in the
// field "ByteRange" in the dictionary "V"
// return success
bool signDocument(const char *filename, const char *certNickname, const char *digestName, const char *password, const char *reason = nullptr);

// checks the length encoding of the signature and returns the hex encoded signature
// if the check passed (and the checked file size as output parameter in checkedFileSize)
// otherwise a nullptr is returned
GooString *getCheckedSignature(Goffset *checkedFileSize);

const GooString *getSignature() const;

private:
bool createSignature(Object &vObj, Ref vRef, const GooString &name, const GooString &reason, const GooString *signature);
bool getObjectStartEnd(GooString *filename, int objNum, Goffset *objStart, Goffset *objEnd);
bool updateOffsets(FILE *f, Goffset objStart, Goffset objEnd, Goffset *sigStart, Goffset *sigEnd, Goffset *fileSize);

bool updateSignature(FILE *f, Goffset sigStart, Goffset sigEnd, const GooString *signature);
};

//------------------------------------------------------------------------
Expand Down Expand Up @@ -586,7 +607,14 @@ class FormFieldSignature : public FormField
~FormFieldSignature() override;
Object *getByteRange() { return &byte_range; }
const GooString *getSignature() const { return signature; }
void setSignature(const GooString &sig);
FormSignatureType getSignatureType() const { return signature_type; }
void setSignatureType(FormSignatureType t) { signature_type = t; }

const GooString &getCustomAppearanceContent() const;
void setCustomAppearanceContent(const GooString &s);

void setCertificateInfo(std::unique_ptr<X509CertificateInfo> &);

private:
void parseInfo();
Expand All @@ -596,6 +624,8 @@ class FormFieldSignature : public FormField
Object byte_range;
GooString *signature;
SignatureInfo *signature_info;
GooString customAppearanceContent;
std::unique_ptr<X509CertificateInfo> certificate_info;

void print(int indent) override;
};
Expand Down
Loading

0 comments on commit a552f83

Please sign in to comment.