This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuestPDF.Fluent; | |
using QuestPDF.Helpers; | |
using QuestPDF.Infrastructure; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a PDF document | |
Document.Create(document => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuestPDF.Fluent; | |
using QuestPDF.Helpers; | |
using QuestPDF.Infrastructure; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a PDF document | |
Document.Create(document => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuestPDF.Fluent; | |
using QuestPDF.Helpers; | |
using QuestPDF.Infrastructure; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a PDF document | |
Document.Create(document => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PdfSharp.Pdf; | |
using PdfSharp.Pdf.IO; | |
using PdfSharp.Drawing; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Load an existing PDF document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PdfSharp.Pdf; | |
using PdfSharp.Drawing; | |
PdfDocument document = new PdfDocument(); | |
PdfPage page = document.AddPage(); | |
XGraphics gfx = XGraphics.FromPdfPage(page); | |
XFont font = new XFont("Verdana", 12, XFontStyle.Regular); | |
int rows = 5; | |
int cols = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PdfSharp.Pdf; | |
using PdfSharp.Drawing; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a new PDF document | |
PdfDocument document = new PdfDocument(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PdfSharp.Pdf; | |
using PdfSharp.Drawing; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// Create a new PDF document | |
PdfDocument document = new PdfDocument(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new document | |
XWPFDocument document = new XWPFDocument(); | |
// Create a new paragraph in the document | |
XWPFParagraph paragraph = document.createParagraph(); | |
XWPFRun run = paragraph.createRun(); | |
run.setText("Here is an image below:"); | |
// Insert an image | |
FileInputStream imageStream = new FileInputStream("path/to/your/image.jpg"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Path to the input DOCX file | |
String inputFilePath = "input.docx"; | |
// Path to the output DOCX file after modification | |
String outputFilePath = "output.docx"; | |
// Open the DOCX file for reading | |
FileInputStream fis = new FileInputStream(inputFilePath); | |
XWPFDocument document = new XWPFDocument(fis); | |
// Read the paragraphs of the DOCX file |