Faster way to build a PDF from image files

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
ddi development b.v.
User
Posts: 2
Joined: Mon Oct 21, 2013 3:02 pm

Faster way to build a PDF from image files

Post by ddi development b.v. »

Hi,

I need to create a PDF file from image files (mostly Tiff and Jpeg). I use the code from the Delphi Demo to insert images into a PDF (see below). For 112 pages that took for black/white Tiff images 6 seconds and for 112 pages Jpeg images 17 seconds. For our purpose this is to slow. We previously used a different tool for this and that did the creation of the PDF's (on the same PC in the same application at the same moment) in less than a second.

Is there a way to accomplish this much faster?

Code: Select all

  lResult := PXC_NewDocumentEx(@lDocument, sDDiPXC40Key, sDDiPXC40DevCode, 2);
  PXC_ErrorCheck(lResult);

  for idx := 0 to FileList.Count - 1 do begin

    lResult := PXC_AddImageW(lDocument, PChar(FileList[idx]), @p);
    PXC_ErrorCheck(lResult);

    lResult := PXC_GetImageDimension(lDocument, p, @iw, @ih);
    PXC_ErrorCheck(lResult);

    lResult := PXC_AddPage(lDocument, iw, ih, @page);
    PXC_ErrorCheck(lResult);

    lResult := PXC_PlaceImage(page, p, 0, ih, iw, ih);
    PXC_ErrorCheck(lResult);

    lResult := PXC_EndPage(page);
    PXC_ErrorCheck(lResult);
  end;

  lResult := PXC_WriteDocumentW(lDocument, FFileName);
  PXC_ErrorCheck(lResult);

  lResult := PXC_ReleaseDocument(lDocument);
  PXC_ErrorCheck(lResult);
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17889
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Faster way to build a PDF from image files

Post by Tracker Supp-Stefan »

Hello ddi development b.v.,

I've asked one of our Tools SDK experts, but he just told me that there is no faster way possible with our products.

Regards,
Stefan
Post Reply