Foxit Developer Blog

    Insights, tutorials, and updates from the Foxit PDF SDK engineering team.

    Foxit Quick PDF Library

    Extract fonts from a PDF programmatically

    Foxit Quick PDF Library lets you extract embedded TrueType fonts from PDF files to a font file on the local disk. All other font types and subsetted TrueType fonts are not supported by the SaveFontToFile function. Here is some C# code that demonstrates how to extract the embedded fonts. // Load the PDF DPL.LoadFromFile("fonts.pdf", ""); [...]

    Read Article
    Foxit Quick PDF Library

    Get list of available paper trays for printer

    In order to get a list of the available paper trays for a printer you need to use the GetPrinterBins function in Foxit Quick PDF Library. This function will return a list of the available paper trays and associated values. You can then use the returned value with the SetupCustomPrinter function to print your documents [...]

    Read Article
    Foxit Quick PDF Library

    Merge PDF files together programmatically

    Foxit Quick PDF Library supports the merging of two or more PDF documents into one PDF document. The primary functions available for this task are MergeDocument, MergeFileList and MergeFileListFast. The function that you use for merging will depend on what your exact requirements are. Merge a list of PDF files If you want to merge [...]

    Read Article
    Foxit Quick PDF Library

    Create a multi-page PDF from a multi-page TIFF programmatically

    Using Foxit Quick PDF Library you can programmatically convert a multi-page TIFF image to a multi-page PDF. Here is some C# sample code that shows you how it’s done. The size of the image drawn onto the PDF is determined by the DPI value of the image (if present). The ImageHorizontalResolution and ImageVerticalResolution functions return [...]

    Read Article
    Foxit Quick PDF Library

    Convert an image to PDF programmatically

    Converting an image to PDF is simple using Foxit Quick PDF Library. The key functions involved are AddImageFromFile and DrawImage. The size of the image drawn onto the PDF is determined by the DPI value of the image (if present). The ImageHorizontalResolution and ImageVerticalResolution functions return the necessary DPI information. PNG and GIF image files do not [...]

    Read Article
    Foxit Quick PDF Library

    Can I use Foxit Quick PDF Library with Microsoft Access to generate PDF reports?

    Yes, you can use Foxit Quick PDF Library to generate PDF files from Microsoft Access. Below you can find sample C# code which demonstrates how this can be done. The sample demonstrates how to generate a PDF using data obtained from a Microsoft Access database. The C# sample project for this code can be downloaded [...]

    Read Article
    Foxit Quick PDF Library

    Can I embed a file in a PDF using Foxit Quick PDF Library?

    Yes, you can easily embed a file in a PDF using the EmbedFile function. This will embed the file (any file type) in a PDF document and then make that file accessible from within the PDF via the attachment panel. This C# sample code demonstrates how easy it is to embed a file within a [...]

    Read Article
    Foxit Quick PDF Library

    Shrink the content on the page to leave a margin around the edges

    Using Foxit Quick PDF Library it is possible to scale down or shrink the content on a page in order to leave a margin on the sides and the top and bottom. This means that you can shrink the content on the page in order to make room for adding new content, such as page [...]

    Read Article
    Foxit Quick PDF Library

    Programmatically stamp one page from a PDF onto a different page in a different PDF

    Foxit Quick PDF Library lets you programmatically stamp one PDF onto another PDF. This can be done using the CapturePage and DrawCapturedPage functions to overlay a PDF file onto another. Here is a small JScript code snippet that uses CapturePage, DrawCapturedPage and a few other Foxit Quick PDF Library functions to complete this task. /* [...]

    Read Article
    Foxit Quick PDF Library

    Set font color of new text

    The SetTextColor function can be used to set the color of text drawn using the DrawText function. // Set text color to red. QP.SetTextColor(255, 0, 0); QP.DrawText(50, 50, "Red colored text"); Foxit Quick PDF Library can only control the color of text that is being drawn using the DrawText function. It cannot change the color [...]

    Read Article