Skip to content

Commit bd94489

Browse files
committed
Fix warning about deprecated field
1 parent 42a02c8 commit bd94489

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: pdftools
22
Type: Package
33
Title: Text Extraction, Rendering and Converting of PDF Documents
4-
Version: 3.6.0
4+
Version: 3.7.0
55
Authors@R: person("Jeroen", "Ooms", role = c("aut", "cre"), email = "[email protected]",
66
comment = c(ORCID = "0000-0002-4035-0289"))
77
Description: Utilities based on 'libpoppler' <https://poppler.freedesktop.org> for extracting

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
3.7.0
2+
- Switch some deprecated fields to new ones
3+
14
3.6.0
25
- pdf_text() gains an argument 'raw' (#138)
36
- MacOS: update fallback library to poppler 25.09.1

src/bindings.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,17 @@ List poppler_pdf_files (RawVector x, std::string opw, std::string upw) {
359359
RawVector res(data.size());
360360
std::copy(data.begin(), data.end(), res.begin());
361361
out.push_back(List::create(
362+
#if VERSION_AT_LEAST(25, 10)
363+
_["name"] = ustring_to_r(file->unicodeName()),
364+
_["mime"] = file->mime_type(),
365+
_["created"] = Datetime(file->creation_date_t()),
366+
_["modified"] = Datetime(file->modification_date_t()),
367+
#else
362368
_["name"] = file->name(),
363369
_["mime"] = file->mime_type(),
364370
_["created"] = Datetime(file->creation_date()),
365371
_["modified"] = Datetime(file->modification_date()),
372+
#endif
366373
_["description"] = ustring_to_r(file->description()),
367374
_["data"] = res
368375
));

0 commit comments

Comments
 (0)