DEV Community

Sarfaraz
Sarfaraz

Posted on

Why I Built a PDF Merge Tool With a Weekly Pass

You need to merge three PDFs: a signed agreement, an invoice and a certificate. The actual work takes 30 seconds, but most PDF sites want you to start a monthly subscription before they'll let you finish.

So I built my own PDF Merge and PDF Split tools on SamToolkit. They're free for 10 pages a day, and if you need more, you can buy a $5 weekly pass: a one-time payment that never renews automatically, so there's no subscription to forget to cancel.

The problem: subscriptions for occasional work

Most people don't merge PDFs every day. They do it a few times a year: when filing taxes, applying for a visa, sending a client a set of documents, or submitting a loan application.

The popular PDF tools are built around monthly or annual plans. Their free tiers work for small jobs, but once you hit a limit, the next step is a recurring subscription. For someone who needs a tool for one busy week, that's the wrong shape of pricing.

I wanted two things:

  • Small jobs should be free, with no signup
  • Bigger jobs should have a short-term option, not just a monthly plan

What I built

Two tools on SamToolkit. No account needed; you just enter an email to get the download link.

  • PDF Merge: combine up to 20 PDFs, reorder or rotate pages, pick page ranges, and add page numbers or a watermark
  • PDF Split: one file per page, a new file every N pages, or custom ranges; the parts download as a zip
Plan Price Pages per day File size
Free $0 10 Up to 5 MB
Weekly pass $5 for 7 days 200 Up to 50 MB
Monthly pass $12 for 30 days 500 Up to 50 MB

Passes are paid once through Razorpay (UPI, card or net banking) and never renew automatically. Daily pages count across Merge and Split and reset at midnight IST.

The weekly pass is the part I care about most. If you have one busy week of paperwork, you pay $5 and you're done.

How it works under the hood

The processing runs on the server in .NET using PdfSharp. PdfSharp is open source, has no native dependencies, and handles page-level operations like merge and split well. Pages are copied as they are, not re-rendered, so text stays selectable and images keep their quality.

The key detail: to copy pages from one PDF into another, you must open the source in Import mode. Here's a simplified version of the merge logic:

using PdfSharp.Pdf;
using PdfSharp.Pdf.IO;

public static byte[] Merge(IEnumerable<Stream> inputs)
{
    using var output = new PdfDocument();

    foreach (var input in inputs)
    {
        using var source = PdfReader.Open(input, PdfDocumentOpenMode.Import);
        for (int i = 0; i < source.PageCount; i++)
            output.AddPage(source.Pages[i]);
    }

    using var ms = new MemoryStream();
    output.Save(ms);
    return ms.ToArray();
}
Enter fullscreen mode Exit fullscreen mode

Split is the same idea in reverse: open the source once, then copy a page range into a new document.

public static byte[] ExtractRange(Stream input, int from, int to)
{
    using var source = PdfReader.Open(input, PdfDocumentOpenMode.Import);
    using var output = new PdfDocument();

    int last = Math.Min(to, source.PageCount);
    for (int i = from - 1; i < last; i++)
        output.AddPage(source.Pages[i]);

    using var ms = new MemoryStream();
    output.Save(ms);
    return ms.ToArray();
}
Enter fullscreen mode Exit fullscreen mode

source.PageCount also makes the daily limit easy to enforce: count the pages before processing and compare them against what's left of the plan for the day.

What happens to your files

Page previews are made in your browser, but the merge or split itself happens on the server, so your files are uploaded over HTTPS. They're automatically deleted after 24 hours, or kept for 30 days under My PDFs if you sign in. They aren't read, kept or shared for anything else.

If you're handling something highly sensitive, a local tool like qpdf or your OS's built-in PDF viewer is always the safest option. SamToolkit is for when you want the job done in a browser tab without installing anything.

What I'd love feedback on

  • Pricing: does a weekly pass make more sense to you than a monthly plan?
  • Speed: how does it handle your largest files, close to the 50 MB limit?
  • Edge cases: scanned PDFs, forms, unusual page sizes, anything that breaks

Try it

Both are free for 10 pages a day, no signup needed. If something breaks or feels off, drop a comment below and I'll fix it.

Top comments (0)