Samsung Printer Drivers - Manually Extracted
============================================

Compatibility
-------------

- Golden Gate++ compatible.
- Prepared for manual macOS driver deployment from the extracted package
  contents.
- Includes Samsung printer PPDs, Samsung printer filters, Samsung print dialog
  extensions, and the optional Samsung Scanner.app.

Contents
--------

- Library/Printers/PPDs/Contents/Resources/Samsung*.gz
- Library/Printers/Samsung/...
- Library/Image Capture/Devices/Samsung Scanner.app

Manual Copy on macOS
--------------------

1. Extract the archive and change into this folder.

2. Copy the complete printer driver tree:

   sudo ditto "Library/Printers" "/Library/Printers"

   Note: ditto merges folders. Existing files with the same path are overwritten,
   while unrelated existing files remain in place.

3. Optional, if scanner support is needed:

   sudo ditto "Library/Image Capture/Devices/Samsung Scanner.app" "/Library/Image Capture/Devices/Samsung Scanner.app"

4. If scanner support is needed on an Apple Silicon Mac, install Rosetta. This
   step is not needed on Intel Macs:

   sudo softwareupdate --install-rosetta --agree-to-license

5. Optional, normalize ownership:

   sudo chown -R root:wheel "/Library/Printers/Samsung"
   sudo chown root:wheel /Library/Printers/PPDs/Contents/Resources/Samsung*.gz
   sudo chown -R root:wheel "/Library/Image Capture/Devices/Samsung Scanner.app"

6. Remove quarantine attributes if macOS blocks the files:

   sudo xattr -dr com.apple.quarantine "/Library/Printers/Samsung"
   sudo xattr -dr com.apple.quarantine "/Library/Image Capture/Devices/Samsung Scanner.app"

7. Locally ad-hoc sign the unsigned Samsung bundles if macOS reports errors for
   files under /Library/Printers/Samsung/PDEs/*.bundle:

   for b in /Library/Printers/Samsung/PDEs/*.bundle; do
     sudo codesign --force --deep --sign - "$b"
   done

8. Optionally sign the Samsung filters too if macOS reports them as unsigned:

   for f in /Library/Printers/Samsung/Filters/commandtosec \
            /Library/Printers/Samsung/Filters/prefilter \
            /Library/Printers/Samsung/Filters/pstosecps \
            /Library/Printers/Samsung/Filters/rastertosec \
            /Library/Printers/Samsung/Filters/rastertosec2; do
     sudo codesign --force --sign - "$f"
   done

9. Remove and re-add the printer in System Settings > Printers & Scanners, or
   restart macOS once.

Allowing the Scanner App on macOS
---------------------------------

When Samsung Scanner.app is opened from Image Capture or Printer Center, macOS
may block it because of a missing or old signature.

In that case:

1. Open Image Capture or Printer Center and try to start the scanner once.
2. If macOS blocks the app, go to System Settings > Privacy & Security.
3. In the Security section, allow the blocked Samsung Scanner.app. The button is
   usually called "Allow Anyway" or similar.
4. Open Image Capture or Printer Center again and start the scanner once more.
   You may need to confirm "Open" one additional time.

If the Mac uses Apple Silicon and the scanner app does not start, install
Rosetta first:

   sudo softwareupdate --install-rosetta --agree-to-license

Notes on PDEs and Filters
-------------------------

- Files under /Library/Printers/Samsung/PDEs/*.bundle are print dialog
  extensions. They provide Samsung-specific options in the print dialog, such as
  graphics, paper, output, and job options.
- Files under /Library/Printers/Samsung/Filters are more important for the
  actual print data pipeline. Do not delete these.
- If the PDE bundles still cause problems after local signing, move them aside
  for testing instead of deleting them:

   sudo mkdir -p "/Library/Printers/Samsung/PDEs.disabled"
   sudo mv /Library/Printers/Samsung/PDEs/*.bundle "/Library/Printers/Samsung/PDEs.disabled/"

  Then test printing. If printing works, only the extended Samsung print dialog
  options may be missing. If printing fails or options are missing, move the
  bundles back.

Original Package Note
---------------------

The original package runs Apple's makequeues helper after installation. With a
manual copy, it is usually enough to remove and re-add the printer or restart
macOS once.
