pkg_local_services version: 1.17.18

Published 2025-09-16

ruud

sdk | dart
repository | svn
platform | generic
status | n/a
  • Readme
  • Changelog
  • Versions

pkg_local_services

Local services that perform specific tasks, executed as external process on the local machine.

graph

When a service is not already available, the library asks to install it by using either apt (Linux), brew (MacOS), or chocolately (Windows), depending on the given platform.

Prerequisites

Linux

sudo apt install ffmpeg fontconfig git imagemagick libreoffice mupdf-tools pngquant poppler-utils subversion libimage-exiftool-perl

pipx install rembg[gpu,cli]

MacOS

Install brew, then:

brew install --cask libreoffice
brew install create-dmg
brew install ffmpeg
brew install fontconfig
brew install imagemagick
brew install mono
brew install mupdf-tools
brew install pngquant
brew install poppler
brew install subversion
brew install exiftool

pip install rembg[gpu,cli]

Windows

In an administrative shell, install chocolatey, then:

choco install svn git vcredist-all imagemagick ghostscript mupdf poppler libreoffice-fresh poppler mupdf ffmpeg pngquant exiftool

pip install rembg[gpu,cli]

Servers

/etc/hosts

192.168.22.40   ict ict.huighaverlag.nl
192.168.22.190  pub.dev.huighaverlag.nl

All

Go to 'https://www.mono-project.com/' and follow the directions to install the Mono .NET framework.

HTML to spreadsheet

Needs an installation of OpenOffice or LibreOffice.

PDF custom colors

Needs an installation of Poppler.

PDF info

Needs an installation of Poppler.

PDF to PNG/JPG

Needs an installation of ImageMagick and MuPDF.

PDF to text

Needs an installation of Poppler.

Execute SQL queries

Needs an installation of Mono, and uses the embedded query executable from pkg_sql_socket_connection (writtenin C# (Mono)).

Mediabase mount point

Check and fetch a mounted mediabase volume.

Remove background from images

See rembg.

Exif copy

Copies exif info from one image to another.

Initialization

You can use something like this in your main() function to check beforehand if a service required by your program is available by providing one or more LocalService values:

  try {
    LocalServices.require([
      LocalService.pdfToPng,
      LocalService.pdfToText,
      LocalService.pdfInfo,
      LocalService.sqlQuery,
      LocalService.htmlToSpreadsheet,
      LocalService.mediabaseMount,
    ]);
  } catch (e) {
    //ignore : avoid_print
    print(e);
  }

If the requirements are satisfied, you can use the services like this (to convert the first page in a PDF file to PNG for example):

  PdfToPngService().toPNG(
    File(r'Schapkaarten_001.pdf').withParent(Directory(
        [r'test', r'assets'].join(Platform.pathSeparator))),
    pageIndex: 0,
  ) 

Changelog

1.17.18 - 2025-09-16

Changed

  • Version bump from 1.17.17 to 1.17.18 (xml -> 6.6.1 (was 6.5.0)).

1.17.17 - 2025-08-15

Removed

  • pkg_xml_validator dependency.

1.17.16 - 2025-08-04

Added

  • XmlValidatorService.

1.17.15 - 2025-07-25

Changed

  • Version bump from 1.17.14 to 1.17.15.

1.17.14 - 2025-07-23

Changed

  • Version bump from 1.17.13 to 1.17.14 (test -> 1.26.3 (was 1.26.2)).

1.17.13 - 2025-05-22

Changed

  • Version bump from 1.17.12 to 1.17.13 (lints -> 6.0.0 (was 5.1.1)).

1.17.12 - 2025-05-22

Changed

  • Version bump from 1.17.11 to 1.17.12 (test -> 1.26.2 (was 1.26.1)).

1.17.11 - 2025-05-20

Changed

  • Version bump from 1.17.10 to 1.17.11 (test -> 1.26.1 (was 1.26.0)).

1.17.10 - 2025-05-14

Changed

  • Parse pdfinfo with pdfbox page range from '9999' to '999999'.

1.17.9 - 2025-05-13

Changed

  • Version bump from 1.17.8 to 1.17.9 (test -> 1.26.0 (was 1.25.15)).

1.17.8 - 2025-04-09

Changed

  • Version bump from 1.17.7 to 1.17.8 (fast_immutable_collections -> 11.0.4 (was 11.0.3)).

1.17.7 - 2025-04-02

Changed

  • Version bump from 1.17.6 to 1.17.7 (collection -> 1.19.1 (was 1.19.0)).

1.17.6 - 2025-04-02

Changed

  • Version bump from 1.17.5 to 1.17.6 (test -> 1.25.15 (was 1.25.14)).

1.17.5 - 2025-03-26

Changed

  • Version bump from 1.17.4 to 1.17.5 (color_models -> 2.0.0 (was 1.3.3)).

1.17.4 - 2025-03-07

Changed

  • Version bump from 1.17.3 to 1.17.4 (pub_semver -> 2.2.0 (was 2.1.5)).

1.17.3 - 2025-03-05

Changed

  • Version bump from 1.17.2 to 1.17.3 (process_run -> 1.2.4 (was 1.2.3)).

1.17.2 - 2025-02-17

Changed

  • Version bump from 1.17.1 to 1.17.2 (process_run -> 1.2.3 (was 1.2.2+1)).

1.17.1 - 2025-01-20

Fixed

  • FileToPreviewService, FileToThumbnailService. MuTools argument error: Illegal number of colorants (indicates that the PDF file you're trying to process contains an invalid number of color components). Fallback to ImageMagick in this case (slower), otherwise your output file will be blank.

Changed

  • Remove imagemagick 'background=white, alpha=off, alpha=remove' command switches for output png files (they support transparency).

1.17.0 - 2025-01-15

Changed

  • Added new linux brew home folder ('/home/linuxbrew/.linuxbrew/bin') to alternative environment constant.

1.16.15 - 2025-01-07

Changed

  • Version bump from 1.16.14 to 1.16.15 (fast_immutable_collections -> 11.0.3 (was 11.0.2)).

1.16.14 - 2025-01-02

Changed

  • Version bump from 1.16.13 to 1.16.14 (fast_immutable_collections -> 11.0.2 (was 11.0.0)).

1.16.13 - 2024-12-30

Changed

  • Cache FontInfoService::getInfo results.

1.16.12 - 2024-12-23

Changed

  • FileToPreviewService, only first frame of gif files.
  • FileToThumbnailService, only first frame of gif files.

1.16.11 - 2024-12-23

Changed

  • Version bump from 1.16.10 to 1.16.11 (collection -> 1.19.0 (was 1.19.1)).

1.16.10 - 2024-12-23

Changed

  • Version bump from 1.16.9 to 1.16.10 (collection -> 1.19.1 (was 1.19.0)).

1.16.9 - 2024-12-23

Changed

  • Version bump from 1.16.8 to 1.16.9 (pub_semver -> 2.1.5 (was 2.1.4)).

1.16.8 - 2024-12-23

Changed

  • Version bump from 1.16.7 to 1.16.8 (test -> 1.25.14 (was 1.25.13)).

1.16.7 - 2024-12-23

Changed

  • Version bump from 1.16.6 to 1.16.7 (lints -> 5.1.1 (was 5.1.0)).

1.16.6 - 2024-12-19

Changed

  • Version bump from 1.16.5 to 1.16.6 (Support Apple silicon (arm64)).

1.16.5 - 2024-12-19

Changed

  • Version bump from 1.16.4 to 1.16.5 (collection -> 1.19.0 (was 1.19.1)).

1.16.4 - 2024-12-19

Changed

  • Version bump from 1.16.3 to 1.16.4 (collection -> 1.19.1 (was 1.19.0)).

1.16.3 - 2024-12-18

Changed

  • Version bump from 1.16.2 to 1.16.3 (test -> 1.25.13 (was 1.25.12)).

1.16.2 - 2024-12-17

Added

  • Added missing hombrew paths for Apple Silicon. (arm64)

1.16.1 - 2024-12-17

Added

  • Added hombrew path for Apple Silicon. (arm64)
  • Changed soffice tsv to xlsx/ods commandline options to force @text cells.

1.16.0 - 2024-12-16

Added

  • CpuArchitectureService to determine the platform cpu type.

1.15.9 - 2024-12-12

Changed

  • Version bump from 1.15.8 to 1.15.9 (lints -> 5.1.0 (was 5.0.0)).

1.15.8 - 2024-12-12

Changed

  • Version bump from 1.15.7 to 1.15.8 (collection -> 1.19.0 (was 1.18.0)).

1.15.7 - 2024-12-05

Changed

  • Version bump from 1.15.6 to 1.15.7 (test -> 1.25.12 (was 1.25.11)).

1.15.6 - 2024-12-04

Changed

  • Version bump from 1.15.5 to 1.15.6 (test -> 1.25.11 (was 1.25.10)).

1.15.5 - 2024-12-03

Changed

  • Version bump from 1.15.4 to 1.15.5 (test -> 1.25.10 (was 1.25.9)).

1.15.4 - 2024-12-02

Changed

  • Version bump from 1.15.3 to 1.15.4 (process_run -> 1.2.2+1 (was 1.2.2)).

1.15.3 - 2024-11-27

Changed

  • Version bump from 1.15.2 to 1.15.3 (test -> 1.25.9 (was 1.25.8)).

1.15.2 - 2024-11-22

Added

  • postscriptname to FontInfo.

1.15.1 - 2024-11-22

Changed

  • Version bump from 1.15.0 to 1.15.1 (equatable -> 2.0.7 (was 2.0.6)).

1.15.0 - 2024-11-05

Changed

  • Support linux for BrewService (linuxbrew).

1.14.10 - 2024-11-01

Changed

  • Version bump from 1.14.9 to 1.14.10.

1.14.9 - 2024-10-03

Changed

  • Force mutools version to be 1.24.0, use imagemagick convert utility otherwise, due to wrong colors in the output files.

1.14.8 - 2024-08-22

Changed

  • Version bump from 1.14.7 to 1.14.8 (SDK update 3.5.1).

1.14.7 - 2024-08-08

Added

  • BrewService to check for updated brew formulae.

1.14.6 - 2024-07-23

Changed

  • Version bump from 1.14.5 to 1.14.6.

1.14.5 - 2024-06-21

Fixed

  • PdfInfo.fromJson then the json was empty.

1.14.4 - 2024-06-19

Fixed

  • PdfInfo::toJson where PdfRects would not be serialized properly as json object.

1.14.3 - 2024-02-28

Added

  • ImagesToMovieService to convert a folder of images to an mp4 movie.

1.14.2 - 2024-02-15

Added

  • verbose and density to FileToPreviewService and FileToThumbnailService.

1.14.1 - 2024-02-01

Changed

  • Version bump from 1.14.0 to 1.14.1 (Resolve package version confusions).

1.14.0 - 2024-02-01

Changed

  • PdfInfoService::getInfo 10 times faster by grouping the data on page number.

1.13.2 - 2024-01-31

Added

  • PdfToJpgService::density.
  • PdfToJpgService::useTrimbox.
  • PdfToJpgService::verbose.
  • PdfToPngService::density.
  • PdfToPngService::useTrimbox.
  • PdfToPngService::verbose.

1.13.1 - 2024-01-16

Changed

  • Version bump from 1.13.0 to 1.13.1 (serverpod 1.2.0).

1.13.0 - 2023-11-15

Added

  • PdfCustomColorsService: extract custom colors from a pdf file.

1.12.1 - 2023-10-16

Fixed

  • exif unit test.

1.12.0 - 2023-10-07

Added

  • ExifService to copy exif info from one image to another.
  • RemoveBackgroundService to remove backgrounds from images.

1.11.0 - 2023-09-28

Changed

  • PdfInfoService: removed PdfBox and replace it with pkg_core::PdfRect.
  • PdfInfoService: added json serialization to PdfInfo.
  • PdfInfoService: added option to only parse the first pdf page.

1.10.4 - 2023-09-20

Changed

  • Slightly different executable detection.

1.10.3 - 2023-08-04

Added

  • prerequisites to README.md.

Changed

  • Refactored building of parameters list.
  • Colorized output of commandline.

1.10.2 - 2023-07-21

Changed

  • FileToPreviewService and FileToThumbnailService are now sync.

1.10.1 - 2023-07-20

Changed

  • FontInfo family parsing.

1.10.0 - 2023-07-19

Added

  • ImageInfoService.

1.9.0 - 2023-07-19

Changed

  • PdfInfoService now retrieves info of all pages and boxes (not just the first).

1.8.2 - 2023-07-10

Changed

  • FileToPreviewService and FileToThumbnailService now rely on pkg_mime_info to determine a file type.
  • FileToPreviewService and FileToThumbnailService now only handle the first frame from video files.

1.8.1 - 2023-06-29

Changed

  • FileToPreviewService now has a page-count for the maximum number of pages to process.

1.8.0 - 2023-06-23

Changed

  • FileToPreviewService and FileToThumbnailService now make use of mupdf-tools because it is much faster dan imagemagick when converting pdf files.

1.7.0 - 2023-06-20

Changed

  • Version bump from 1.6.1 to 1.6.2.

1.6.1 - 2023-06-19

Added

  • PdfBox.fromDimensions.

Removed

  • Deprecated functions.

1.6.0 - 2023-06-09

Added

  • FontInfoService.

1.5.2 - 2023-05-22

Fixed

  • Wrong async constructs.

1.5.1 - 2023-05-02

Changed

  • FileToPreviewService now returns a list of files.
  • FileToThumbnailService now returns a list of files.

1.5.0 - 2023-05-02

Added

  • FileToPreviewService.

1.4.2 - 2023-04-26

Added

  • PngOptimizeService.

1.4.1 - 2023-04-25

Changed

  • Typo in CHANGELOG.md: PdfToThumbnailService was meant to be FileToThumbnailService.

1.4.0 - 2023-04-25

Added

  • PdfToThumbnailService.

1.3.13 - 2023-04-13

Fixed

  • await unawaited futures.
  • Marked some futures unawaited.

1.3.12 - 2023-02-09

Changed

  • Version bump from 1.3.11 to 1.3.12 (Version confusion after compiler bug chaos).

1.3.11 - 2022-12-27

Changed

  • Version bump from 1.3.10 to 1.3.11.

1.3.10 - 2022-12-22

Changed

  • Version bump from 1.3.9 to 1.3.10.

1.3.9 - 2022-12-22

Changed

  • Version bump from 1.3.8 to 1.3.9 (Recompile due to installer optimizations).

1.3.8 - 2022-10-28

Added

  • outputName option to PdfToPng and PdfToJpg.
  • forceOverwrite flag to PdfToPng and PdfToJpg.

1.3.7 - 2022-10-20

Added

  • surface to PdfBox.

1.3.6 - 2022-10-11

Changed

  • Version bump from 1.3.5 to 1.3.6 (Recompile due to wrong GetIt.instance syntax.).

1.3.5 - 2022-10-05

Changed

  • Version bump from 1.3.4 to 1.3.5 (fixed pdflib searchpath macos crash).

1.3.4 - 2022-10-01

Changed

  • Version bump from 1.3.3 to 1.3.4 (pkg_pdflib bundle macos dylib).

1.3.3 - 2022-09-29

Changed

  • Version bump from 1.3.2 to 1.3.3 (dependencies upgraded).

1.3.2 - 2022-09-28

Fixed

  • SpreadsheetService now converts tsv files to ods or xlsx via proper soffice settings.

1.3.1 - 2022-09-23

Added

  • toDimensionsInMm to `PdfBox'.

1.3.0 - 2022-09-15

Changed

  • Renamed HtmlToSpreadsheetService to `SpreadsheetService'.

1.2.0 - 2022-09-10

Added

  • PdfToJpgService.
  • 'PdfToPngService', remove transparency with white.

1.1.0 - 2022-08-24

Added

  • MediabaseMountService.

1.0.0 - 2022-07-25

Changed

  • First major version.

0.0.1+2 - 2022-06-02

Added

  • HtmlToSpreadsheetService.

0.0.1 - 2022-02-28

Changed

  • Initial version.

1.17.18

2025-09-16 download

1.17.17

2025-08-15 download

1.17.16

2025-08-04 download

1.17.15

2025-07-25 download

1.17.14

2025-07-23 download

1.17.13

2025-05-22 download

1.17.11

2025-05-20 download

1.17.10

2025-05-14 download

1.17.9

2025-05-13 download

1.17.8

2025-04-09 download

1.17.7

2025-04-02 download

1.17.5

2025-03-26 download

1.17.4

2025-03-07 download

1.17.3

2025-03-05 download

1.17.2

2025-02-17 download

1.17.1

2025-01-20 download

1.16.15

2025-01-07 download

1.16.14

2025-01-02 download

1.16.13

2024-12-30 download

1.16.12

2024-12-23 download

1.16.11

2024-12-23 download

1.16.6

2024-12-19 download

1.16.3

2024-12-18 download

1.16.2

2024-12-17 download

1.16.1

2024-12-17 download

1.15.9

2024-12-12 download

1.15.3

2024-11-27 download

1.15.2

2024-11-22 download

1.15.0

2024-11-05 download

1.14.10

2024-11-01 download

1.14.9

2024-10-03 download

1.14.8

2024-08-22 download

1.14.7

2024-08-08 download

1.14.6

2024-07-23 download

1.14.5

2024-06-21 download

1.14.4

2024-06-19 download

1.14.3

2024-02-28 download

1.14.2

2024-02-15 download

1.14.1

2024-02-01 download

1.14.0

2024-02-01 download

1.13.1

2024-01-16 download

1.13.0

2023-11-15 download

1.12.1

2023-10-16 download

1.12.0

2023-10-07 download

1.11.0

2023-09-28 download

1.10.4

2023-09-20 download

1.10.3

2023-08-04 download

1.10.2

2023-07-21 download

1.9.0

2023-07-19 download

1.8.2

2023-07-10 download

1.8.1

2023-06-29 download

1.8.0

2023-06-23 download

1.7.0

2023-06-20 download

1.6.2

-- download

1.6.0

2023-06-09 download

1.5.2

2023-05-22 download

1.5.1

2023-05-02 download

1.5.0

2023-05-02 download

1.4.2

2023-04-26 download

1.4.1

2023-04-25 download

1.4.0

2023-04-25 download

1.3.13

2023-04-13 download

1.3.12

2023-02-09 download

1.3.11

2022-12-27 download

1.3.10

2022-12-22 download

1.3.9

2022-12-22 download

1.3.8

2022-10-28 download

1.3.7

2022-10-20 download

1.3.6

2022-10-11 download

1.3.5

2022-10-05 download

1.3.4

2022-10-01 download

1.3.3

2022-09-29 download

1.3.2

2022-09-28 download

1.3.1

2022-09-23 download

1.3.0

2022-09-15 download

1.2.0

2022-09-10 download

1.1.0

2022-08-24 download

1.0.0

2022-07-25 download