Skip to content

v1.2.0 — Show the page, and edit by clicking it

Choose a tag to compare

@romizone romizone released this 26 Jul 10:09
· 6 commits to main since this release

The app now shows the document it is working on, and the editor is driven by
clicking the page instead of typing coordinates.

Installing

  1. Open the .dmg and drag PdfRomeo into Applications.
  2. Clear the download quarantine flag:
xattr -dr com.apple.quarantine /Applications/PdfRomeo.app
  1. Launch normally. The step is needed because the app is ad-hoc signed
    rather than notarised with an Apple Developer ID.

Every tool shows the page

Until now nothing in the app displayed a PDF. A complete viewer existed in
app/ui/viewer.py but was never instantiated, so all 43 tools were operated
blind — fill in a form, press Run, then open the result somewhere else to
find out what happened.

  • A rendered page now sits beside the options, with page navigation, zoom
    and fit-to-width.
  • Tool pages are laid out in two panes: options on the left, document on the
    right. Tools with no PDF to show (HTML → PDF, Images → PDF) collapse the
    pane and centre their options.
  • After a run, the pane switches to the file that was just produced.

The editor is a canvas

Click the page to place text. The click sets the text baseline, so the
Page, X position (pt) and Y position (pt) fields are gone. Placed
items are listed, can be removed before saving, and are marked on the page.

Click existing text to rewrite it. Editable text is outlined; picking a
piece of it opens the current wording for editing. This is new — the engine
previously had no way to alter text already in a document, only to stamp
more on top.

  • The original glyphs are removed with a redaction rather than covered, so
    the old wording cannot be recovered by copy-paste.
  • Size, colour and font carry over from the text being replaced. Embedded
    fonts cannot be reused for new glyphs without the original font file, so
    the nearest standard face is chosen from the font's name and flags —
    serif, monospace, bold and italic are all preserved.
  • A replacement longer than the original is shrunk until it fits.

Several placements and rewrites can be queued and applied in one pass.

Under the hood

New engine functions PdfEngine.text_spans, add_text_items,
replace_text_spans and substitute_font, each covered by
tests/regression.py (now 23 checks). tests/smoke_ui.py additionally
asserts that PDF tools render their source and that the editor asks for no
coordinates.

Full changelog: v1.1.4...v1.2.0