Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into master_github
Browse files Browse the repository at this point in the history
  • Loading branch information
tsdgeos committed Nov 8, 2024
2 parents 3f48685 + b6a783b commit 493f4c9
Show file tree
Hide file tree
Showing 23 changed files with 666 additions and 92 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ clang_format:
stage: build
before_script:
- apt-get update
- apt-get install --yes --no-install-recommends git clang-format-16
- apt-get install --yes --no-install-recommends git clang-format-19
script:
- find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format-16 -i {} \;
- find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format-19 -i {} \;
- git diff --exit-code

build:
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (ECM_FOUND)
endif()

set(POPPLER_MAJOR_VERSION "24")
set(POPPLER_MINOR_VERSION_STRING "10")
set(POPPLER_MINOR_VERSION_STRING "11")
# We want the string version to have 08 but the integer version can't have a leading 0 since otherwise it's considered octal
# So strip a leading 0 if found in POPPLER_MINOR_VERSION_STRING and store the result in POPPLER_MINOR_VERSION
string(REGEX REPLACE "^0?(.+)$" "\\1" POPPLER_MINOR_VERSION "${POPPLER_MINOR_VERSION_STRING}")
Expand Down Expand Up @@ -616,7 +616,7 @@ ADD_GPERF_FILE(TimesItalicWidths)
ADD_GPERF_FILE(TimesRomanWidths)
ADD_GPERF_FILE(ZapfDingbatsWidths)

set(POPPLER_SOVERSION_NUMBER "142")
set(POPPLER_SOVERSION_NUMBER "143")

set(LINKER_SCRIPT "${CMAKE_BINARY_DIR}/libpoppler.map")
configure_file(
Expand Down
24 changes: 24 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
Release 24.11.0:
core:
* Fix rendering of some buttons
* Fix selecting fonts in TTC font collections
* CairoOutputDev: prevent infinite loop in functionShadedFill()
* Fix some unstable headers not being usable on their own
* Fix some headers not being usable on their own

glib:
* Fix some headers not being usable on their own
* add INSTALL_GLIB_DEMO option to install poppler-glib-demo
* Fix Launch action with unicode encoded filenames

qt6:
* Fix memory handling issue on signature creation
* Fix Launch action with unicode encoded filenames

qt5:
* Fix Launch action with unicode encoded filenames

build system:
* Remove duplicate definitions
* cmake: Set CMAKE_C_STANDARD to 17

Release 24.10.0:
core:
* Add support for SubmitForms Links
Expand Down
2 changes: 1 addition & 1 deletion README.contributors
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To get the clang-format warnings locally instead at CI time we recommend you
to copy the hooks/pre-commit to your .git
cp hooks/pre-commit .git/hooks/

We are using clang-format 15 on CI. Unfortunately clang-format is not totally
We are using clang-format 19 on CI. Unfortunately clang-format is not totally
compatible with older versions of itself. If CI gives you trouble but your local
clang-format disagrees, just apply the changes suggested by CI and then commit
with the --no-verify flag. If you get stuck, don't hesitate to ask the reviewer
Expand Down
2 changes: 1 addition & 1 deletion cpp/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PROJECT_NAME = "Poppler CPP"
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 24.10.0
PROJECT_NUMBER = 24.11.0

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Expand Down
45 changes: 43 additions & 2 deletions glib/demo/annots.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ typedef struct
} Annotations;

static const Annotations supported_annots[] = {
{ POPPLER_ANNOT_TEXT, "Text" }, { POPPLER_ANNOT_LINE, "Line" }, { POPPLER_ANNOT_SQUARE, "Square" }, { POPPLER_ANNOT_CIRCLE, "Circle" }, { POPPLER_ANNOT_HIGHLIGHT, "Highlight" },
{ POPPLER_ANNOT_UNDERLINE, "Underline" }, { POPPLER_ANNOT_SQUIGGLY, "Squiggly" }, { POPPLER_ANNOT_STRIKE_OUT, "Strike Out" }, { POPPLER_ANNOT_STAMP, "Stamp" },
{ POPPLER_ANNOT_TEXT, "Text" }, { POPPLER_ANNOT_FREE_TEXT, "Free Text" }, { POPPLER_ANNOT_LINE, "Line" }, { POPPLER_ANNOT_SQUARE, "Square" }, { POPPLER_ANNOT_CIRCLE, "Circle" },
{ POPPLER_ANNOT_HIGHLIGHT, "Highlight" }, { POPPLER_ANNOT_UNDERLINE, "Underline" }, { POPPLER_ANNOT_SQUIGGLY, "Squiggly" }, { POPPLER_ANNOT_STRIKE_OUT, "Strike Out" }, { POPPLER_ANNOT_STAMP, "Stamp" },
};

static const char *stamp_types[] = { [POPPLER_ANNOT_STAMP_ICON_UNKNOWN] = "Unknown",
Expand Down Expand Up @@ -478,6 +478,27 @@ static void pgd_annot_view_set_annot_free_text(GtkWidget *table, PopplerAnnotFre
text = get_free_text_callout_line(annot);
pgd_table_add_property(GTK_GRID(table), "<b>Callout:</b>", text, row);
g_free(text);

PopplerColor *color = poppler_annot_get_color(POPPLER_ANNOT(annot));

if (color) {
text = g_strdup_printf("(%d, %d, %d)", color->red, color->green, color->blue);
} else {
text = g_strdup("null");
}
pgd_table_add_property(GTK_GRID(table), "<b>Color:</b>", text, row);
g_free(text);

PopplerFontDescription *font_desc = poppler_annot_free_text_get_font_desc(annot);
PangoFontDescription *p = pango_font_description_new();
pango_font_description_set_family(p, font_desc->font_name);
pango_font_description_set_stretch(p, (PangoStretch)font_desc->stretch);
pango_font_description_set_weight(p, (PangoWeight)font_desc->weight);
pango_font_description_set_style(p, (PangoStyle)font_desc->style);
pango_font_description_set_size(p, font_desc->size_pt * PANGO_SCALE);
text = pango_font_description_to_string(p);
pgd_table_add_property(GTK_GRID(table), "<b>Font:</b>", text, row);
g_free(text);
}

static void pgd_annot_view_set_annot_stamp(GtkWidget *table, PopplerAnnotStamp *annot, gint *row)
Expand Down Expand Up @@ -616,6 +637,15 @@ static void pgd_annot_view_set_annot(PgdAnnotsDemo *demo, PopplerAnnot *annot)
pgd_table_add_property(GTK_GRID(table), "<b>Coords:</b>", text, &row);
g_free(text);

double border_width;
if (poppler_annot_get_border_width(POPPLER_ANNOT(annot), &border_width)) {
text = g_strdup_printf("%f", border_width);
} else {
text = g_strdup("unset");
}
pgd_table_add_property(GTK_GRID(table), "<b>Border Width:</b>", text, &row);
g_free(text);

if (POPPLER_IS_ANNOT_MARKUP(annot)) {
pgd_annot_view_set_annot_markup(table, POPPLER_ANNOT_MARKUP(annot), &row);
}
Expand Down Expand Up @@ -859,6 +889,17 @@ static void pgd_annots_add_annot(PgdAnnotsDemo *demo)
case POPPLER_ANNOT_TEXT:
annot = poppler_annot_text_new(demo->doc, &rect);

break;
case POPPLER_ANNOT_FREE_TEXT:
annot = poppler_annot_free_text_new(demo->doc, &rect);
poppler_annot_set_contents(annot, "Free Text");
PopplerFontDescription *font_desc = poppler_font_description_new("DejaVu Sans");
font_desc->size_pt = 17;
font_desc->style = POPPLER_STYLE_OBLIQUE;
font_desc->weight = POPPLER_WEIGHT_BOLD;
font_desc->stretch = POPPLER_STRETCH_CONDENSED;
poppler_annot_free_text_set_font_desc(POPPLER_ANNOT_FREE_TEXT(annot), font_desc);
poppler_font_description_free(font_desc);
break;
case POPPLER_ANNOT_LINE: {
PopplerPoint start, end;
Expand Down
Loading

0 comments on commit 493f4c9

Please sign in to comment.