Foxit Developer Blog

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

    Foxit Quick PDF Library

    Programmatically determine the content area of a page in a PDF

    It’s easy to determine the size of a page by using the PageHeight and PageWidth, but it’s a little more difficult to determine the rectangular content area of a page. There are functions in the library for returning the text coordinates such as GetPageText and there’s functions for determining the coordinates of images, but there’s [...]

    Read Article
    Foxit Quick PDF Library

    Issue with Ricoh printers where PDFs come out in black and white instead of color

    Foxit Quick PDF Library uses the standard Windows DEVMODE structure for printing which is used by many other programs as well. Unfortunately the printer driver manufacturers don’t use the values specified in the DEVMODE structure and instead use custom undocumented values. This means that the SetupCustomPrinter function works for many drivers but not every driver. [...]

    Read Article
    Foxit Quick PDF Library

    Extract text from a defined rectangular area on a page

    Foxit Quick PDF Library includes a range of functionality for extracting text from PDF files, but usually it’s for extract text from an entire page. The extract functions which include “area” in the name let you specify a rectangular area from which you wish to extract text. The key functions for this using regular memory [...]

    Read Article
    Foxit Quick PDF Library

    Programmatically impose multiple pages on one page (imposition)

    There is not a single “imposition” function in Foxit Quick PDF Library but it’s easy to use the CapturePage and DrawCapturedPage functions to do the imposition. There is some sample code below that demonstrates how to take a few different PDFs, merge them together, and then impose each page onto one page in a new document. [...]

    Read Article
    Foxit Quick PDF Library

    Is printing PostScript to PDF supported?

    No, the Postscript functions in Foxit Quick PDF Library such as DrawPostScriptXObject will only embed existing postscript commands into a PDF. This is mainly done for printers. Most, if not all PDF viewers do not contain any Postscript rendering functionality so you page may be technically correct but there is not viewer that can render [...]

    Read Article
    Foxit Quick PDF Library

    Get embedded image coordinates from PDF files

    Foxit Quick PDF Library lets you analyze, extract and replace embedded images in PDF files using the extensive image handling functions. The GetPageImageList function returns an ImageListID which you can use in the GetImageListItemDblProperty function. With this function you can get the coordinates for each image in the image list. The GetImageListItemIntProperty function useful for [...]

    Read Article
    Foxit Quick PDF Library

    Create links to dial a phone from a PDF link on mobile devices

    In a recent post titled Dial a Phone from a PDF Link on Mobile Devices on the Acrobat For Legal Professionals blog, it was demonstrated how you can create a web link in a PDF that when clicked on an mobile device would dial the phone number. Well it is easy to add these links programmatically [...]

    Read Article
    Foxit Quick PDF Library

    Programmatically convert EMF to PDF

    The ImportEMFFromFile function is designed specifically for importing EMF and WMF file formats. Delphi sample code provided below demonstrates how to use this function. procedure TForm2.btnImportEMFFromFileClick(Sender: TObject); var FileName: string; ImageID: Integer; ImWidth: Integer; ImHeight: Integer; begin PDFLibrary := TDebenuPDFLibrary1113.Create; try UnlockResult := PDFLibrary.UnlockKey('INSERT LICENSE KEY'); if UnlockResult = 1 then begin FileName := 'C:Sample.EMF' [...]

    Read Article
    Foxit Quick PDF Library

    Is Foxit Quick PDF Library thread-safe?

    Usually when the phrase “thread safe” is used it means that the same instance of the library can be accessed by different threads at the same time. This means that Foxit Quick PDF Library is not thread safe because a single instance of Foxit Quick PDF Library can only be accessed by the thread that [...]

    Read Article
    Foxit Quick PDF Library

    Extract images from PDF files as the appropriate image type

    Sometimes it’s necessary to extract images from PDF files and save them to disk. When this happens you’ll most likely want to save the image data back into the image format that it was originally in before it was added to the PDF. This can be tricky at times because some image formats such as [...]

    Read Article