---
title: "PDF"
canonical: https://www.graphicsmill.com/samples/tags/pdf
product: "Graphics Mill"
---

# PDF

Importing and exporting PDF documents

- [Browse all samples](<https://www.graphicsmill.com/samples/index_md>)

## Samples

- [Add a tiled watermark to PDF pages](<https://www.graphicsmill.com/samples/Codecs/Pdf/AddWatermark_cs_md>): Adds a semi-transparent, rotated tiled text watermark to every page of a PDF file.
- [Add and remove pages in an existing PDF](<https://www.graphicsmill.com/samples/Codecs/Pdf/AddAndRemovePages_cs_md>): Rebuilds an existing PDF page by page, removing one page and inserting a new one.
- [Combine multiple PDF files into one document](<https://www.graphicsmill.com/samples/Codecs/Pdf/MergePages_cs_md>): Combines the pages of several existing PDF files into one multi-page PDF document.
- [Create a die-cut outline around artwork](<https://www.graphicsmill.com/samples/Drawing/Paths/CreateDieCutOutline_cs_md>): Traces the outline of a PNG with transparency, offsets and smooths it, and writes it as a spot-colour cut line to PDF.
- [Create a PDF/VT file with personalized business cards](<https://www.graphicsmill.com/samples/Codecs/Pdf/CreatePdfVT_cs_md>): Creates a PDF/VT file with personalized business card records for a batch of recipients.
- [Create a PDF/X-4 file with CMYK output intent](<https://www.graphicsmill.com/samples/Codecs/Pdf/CreateX4_cs_md>): Creates a PDF/X-4 file with CMYK output intent and color-managed images.
- [Create Business Card](<https://www.graphicsmill.com/samples/Codecs/Pdf/CreateBusinessCard_cs_md>): Creates a business card layout and saves it as a PDF file.
- [Create Multipage PDF](<https://www.graphicsmill.com/samples/Codecs/Pdf/CreateMultipagePDF_cs_md>): Generates personalized multipage PDF invitations with variable data.
- [Draw On PDF With Spot Color](<https://www.graphicsmill.com/samples/Codecs/SpotColors/DrawOnPdfWithSpotColor_cs_md>): Fills a rectangle with a PANTONE spot color in a PDF document.
- [Draw Spot On CMYK](<https://www.graphicsmill.com/samples/Codecs/SpotColors/DrawSpotOnCmyk_cs_md>): Draws text and an image on a spot channel over a CMYK background in a PDF.
- [Enum Container Elements](<https://www.graphicsmill.com/samples/Codecs/VectorFormats/EnumContainerElements_cs_md>): Enumerate and print the elements of a graphics container from a PDF file.
- [Fade and shape images with soft masks](<https://www.graphicsmill.com/samples/Drawing/ClippingPaths/ApplySoftMask_cs_md>): Fades a photo with a gradient luminosity mask and cuts another to the shape of a PNG with an alpha mask, then writes them to PDF.
- [Lay out paragraphs, lists, and tab-aligned columns in a PDF](<https://www.graphicsmill.com/samples/Codecs/Pdf/AdvancedTypography_cs_md>): Lays out paragraphs, a bulleted list, and a dot-leader tab-aligned schedule directly in a PDF.
- [Overlay one PDF's graphics onto another](<https://www.graphicsmill.com/samples/Codecs/Pdf/OverlayPages_cs_md>): Overlays the vector content of one PDF, a seal, onto every page of another PDF.
- [PDF Layers](<https://www.graphicsmill.com/samples/Codecs/Pdf/Layers_cs_md>): Creates a PDF document with multiple visible and invisible layers.
- [PDF To SVG](<https://www.graphicsmill.com/samples/Codecs/VectorFormats/PdfToSVG_cs_md>): Convert vector content from a PDF file to SVG format.
- [Place JPEG photos into a PDF without recompression](<https://www.graphicsmill.com/samples/Codecs/Pdf/PlaceJpegWithoutRecompression_cs_md>): Embeds RGB and CMYK JPEG files into a PDF byte for byte with CompressedImage, which is faster and uses less memory than decoding and recompressing them.
- [Rasterize a PDF page two ways: quick vs. full control](<https://www.graphicsmill.com/samples/Codecs/Pdf/RasterizePdfTwoWays_cs_md>): Compares PdfFrame.GetBitmap, a quick RGB24 preview, against GraphicsContainerRasterizer, which allows any pixel format and resolution.
- [Read and write PDF page boxes](<https://www.graphicsmill.com/samples/Codecs/Pdf/PageBoxes_cs_md>): Defines print production page boxes (bleed, trim, art) on a 300 DPI PDF using UnitConverter, then reads them back with PdfReader.
- [Recolor Red Strokes](<https://www.graphicsmill.com/samples/Codecs/VectorFormats/RecolorRedStrokes_cs_md>): Detect and recolor red strokes in a graphics container.
- [Replace Process Color](<https://www.graphicsmill.com/samples/Codecs/SpotColors/ReplaceProcessColor_cs_md>): Converts a process color to a spot color and saves the result as a PDF.
- [Save Spot Image To PDF](<https://www.graphicsmill.com/samples/Codecs/SpotColors/SaveSpotImageToPdf_cs_md>): Creates an image with a spot color and saves it to a PDF file.
- [Save Vector Content To JPEG](<https://www.graphicsmill.com/samples/Codecs/VectorFormats/SaveToJpeg_cs_md>): Rasterize PDF vector content and save as JPEG.
- [Supply linked images when reading SVG](<https://www.graphicsmill.com/samples/Codecs/VectorFormats/ResolveSvgImages_cs_md>): Resolves the image references of an SVG from a local asset cache with the ResolveImage callback and converts the SVG to PDF.
- [SVG To PDF](<https://www.graphicsmill.com/samples/Codecs/VectorFormats/SVGToPdf_cs_md>): Convert an SVG file to PDF format.
- [Write Bitmap To PDF Memory Friendly](<https://www.graphicsmill.com/samples/Codecs/Pdf/WriteBitmapToPdfMemoryFriendly_cs_md>): Saves a JPEG image to PDF using a memory-friendly pipeline approach.
- [Write Raster And Vector Graphics To PDF](<https://www.graphicsmill.com/samples/Codecs/Pdf/WriteRasterAndVectorGraphicsToPdf_cs_md>): Saves both raster and vector graphics to a PDF file with compression.
- [Write Text To PDF](<https://www.graphicsmill.com/samples/Codecs/Pdf/WriteTextToPDF_cs_md>): Writes plain and round text as PDF text with embedded fonts.

