Skip to main content

Posts

Showing posts from July, 2026

Resize PDF Pages in C#: Change PDF Page Size

  PDF page size is often overlooked until a document needs to be printed, archived, or processed in bulk. In many business systems, PDF files may come from different sources: scanned documents, exported reports, generated invoices, or legacy templates. As a result, the page dimensions may not be consistent. In a .NET application, one practical way to resize PDF pages is to create a new PDF document with the desired page size, then draw each original page onto the new page as a template. This keeps the visual content of the source PDF, including text, images, tables, and layout, while producing a document with standardized page dimensions. This article demonstrates how to resize PDF pages in C# for two common scenarios: Changing PDF pages to a standard paper size such as A4, A3, A1, Letter, or Legal Changing PDF pages to a custom size defined in inches or millimeters The examples use C# and Spire.PDF for .NET. Install the PDF Library Install the package from NuGet: PM > Install-...

Convert Word DOCX to Markdown in Java: Basic Conversion and Export Options

  Markdown is widely used in developer documentation, README files, static sites, internal knowledge bases, and Git-based content workflows. However, source documents are not always written in Markdown from the beginning. In many teams, product specs, technical drafts, reports, or user manuals may still arrive as Word documents. This guide shows how to convert a Word document to Markdown in Java. We will start with the simplest DOCX-to-MD conversion, then add export options for images, lists, hyperlinks, underline formatting, tables, and Office Math equations. The goal is not just to generate a .md file, but to understand which export settings matter when the Word document contains real-world formatting. Prerequisites Before starting, make sure you have: JDK 8 or later A Maven-based Java project A DOCX file to test with Basic familiarity with Java file paths For the conversion API, this example uses Spire.Doc for Java. Add the Maven repository and dependency to your pom.xml : <...