Skip to content

fix: preserve clickable hyperlinks in exported PDFs - #67

Closed
0xf3dz wants to merge 1 commit into
andrewjiang:mainfrom
0xf3dz:fix/pdf-clickable-links
Closed

0xf3dz wants to merge 1 commit into
andrewjiang:mainfrom
0xf3dz:fix/pdf-clickable-links

Conversation

@0xf3dz

@0xf3dz 0xf3dz commented May 31, 2026

Copy link
Copy Markdown
Contributor

When generating the PDF/print version of a resume, inline and contact links were rendered as plain text () instead of real links (), so exported PDFs had no clickable links. They were only clickable in the live editor preview. This change renders a real link whenever a URL is present, so links work in the PDF too.

All pnpm checks passed.

Tested locally: the exported PDF links (LinkedIn, GitHub, repos) are now clickable instead of plain text, and remain clickable in the live preview.

Note: this leaves the interactive component unused (it only gated link rendering). If non-clickable links were intentional for Free tier purposes, feel free to disregard.

@0xf3dz
0xf3dz requested a review from andrewjiang as a code owner May 31, 2026 07:00
@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

@0xf3dz is attempting to deploy a commit to the LockIn Team on Vercel.

A member of the Team first needs to authorize it.

andrewjiang pushed a commit that referenced this pull request Jul 27, 2026
The print view rendered the resume with interactive={false}, which flattens
every contact and inline link to a <span>. That view is what the PDF pipeline
prints, so exported PDFs carried no link annotations at all — the links were
only clickable in the live editor preview.

Render the print view with real anchors instead. Verified against the print
route: the generated PDF now carries link annotations for the contact row and
inline links (mailto, x, linkedin, github, and inline URLs) where it previously
had none.

The interactive flag still gates link rendering everywhere else, so the resume
thumbnails on /templates and the landing page stay inert — those previews sit
inside card links, and real anchors there would nest <a> inside <a>.

Fixes the bug reported in #67.

Co-authored-by: 0xf3dz <124228674+0xf3dz@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M7fKRZGJ2XH6E4AXktKRzN

Copy link
Copy Markdown
Owner

Thanks for this — the diagnosis is right and the bug is real. I confirmed it by generating a PDF from the print route: on main it carries 0 /URI link annotations, and with your patch it carries 8 (mailto:, x.com, linkedin, github, inline URLs). That's a genuine gap worth closing.

One problem with removing the gate in resume-content.tsx: interactive={false} isn't only the PDF path. ResumePaperPreview uses it for the resume thumbnails on /templates and the landing page, and those previews sit inside <Link> cards — so the links inside them become <a> nested in <a>. With your branch merged onto current main I measured:

  • /templates: 28 nested anchors inside 20 card links; landing page: 11
  • console: In HTML, <a> cannot be a descendant of <a>. This will cause a hydration error, followed by Hydration failed because the server rendered HTML didn't match the client
  • clicking a contact link in a template thumbnail navigates to LinkedIn instead of opening the template

The narrower version is to leave resume-content.tsx alone and stop passing interactive={false} in resume-print-view.tsx — one line, in the component that actually feeds the PDF. I measured the same 8 PDF link annotations with 0 nested anchors and no hydration errors, and it keeps interactive a meaningful prop instead of leaving it dead, which you flagged yourself.

Rather than leave this sitting, I've opened #84 with that one-line change, with you as co-author on the commit since the find and the fix direction are yours. Happy to go the other way and take an update to this PR instead if you'd prefer — just say so.

Heads up on one process detail: CI never ran here (fork PRs need a maintainer to approve the workflow), which is why only the GitGuardian check reported on this PR.


Generated by Claude Code

andrewjiang added a commit that referenced this pull request Jul 27, 2026
Render the print view with real anchors so exported PDFs keep link
annotations for contact and inline links. The interactive flag still gates
link rendering in resume previews, which sit inside card links.

Bug reported in #67.

Co-authored-by: 0xf3dz <124228674+0xf3dz@users.noreply.github.com>

Copy link
Copy Markdown
Owner

Thanks again for catching this, @0xf3dz — exported PDFs had been shipping with dead links and nobody had noticed. Your diagnosis was exactly right, and the note about interactive becoming dead code was the detail that pointed at the narrower fix.

The one-line version landed in #84 with you as co-author, so I'm closing this one out. PDFs exported from Tiny CV now keep clickable contact and inline links.

Really appreciate the contribution — please send more our way.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants