Active X and creation of pdf

Questions, comments and suggestions concerning VintaSoft Twain ActiveX.

Moderator: Alex

Post Reply
Posts: 1
Joined: Tue Feb 26, 2019 7:31 pm

Active X and creation of pdf

Post by philipljackson » Tue Feb 26, 2019 7:40 pm


I program in Delphi, your example program works well when creating a .bmp program.

I now have a licenced copy of your product and I am wanting to save my documents as .pdf files.

The procedure VSTwain1.Register returns true so I have the correct credentials in place.

I have added the following to the example application

Code: Select all

         // set settings of PDF encoder
        VSTwain1.PdfEncoder_MultiPage                := True;
        VSTwain1.PdfEncoder_DocumentAuthor           := 'Demo App';
         VSTwain1.PdfEncoder_DocumentCreator          := 'Demo App';
         VSTwain1.PdfEncoder_DocumentModificationDate := FormatDateTime('dd/mm/yy hh:mm',now);

        // acquire image(s) from the device
          acquireModalState1 := VSTwain1.Device_AcquireImageModal();

          // if image is acquired
          If acquireModalState1 = ACQUIREMODALSTATE_ImageAcquired Then


            // dispose an acquired image
                      // if scan is canceled
          If acquireModalState1 = ACQUIREMODALSTATE_ScanCanceled Then
            ShowMessage('Scan is canceled.');

          // if scan is failed
          If acquireModalState1 = ACQUIREMODALSTATE_ScanFailed Then
            ShowMessage('Scan is failed: ' + VSTwain1.errorString);

        Until acquireModalState1 = ACQUIREMODALSTATE_None;
The file 'test.pdf' is created but is of zero byte size

Can you please advise if I have missed out something?


Philip L Jackson

Site Admin
Posts: 1720
Joined: Thu Jul 10, 2008 2:21 pm

Re: Active X and creation of pdf

Post by Alex » Wed Feb 27, 2019 2:49 pm

Hi Philip,

Our support staff answered to your question. You need to check the return code of the AcquiredImages_Save method.

Best regards, Alexander

Site Admin
Posts: 1720
Joined: Thu Jul 10, 2008 2:21 pm

Re: Active X and creation of pdf

Post by Alex » Tue Mar 05, 2019 10:51 am

Hi Philip,

Thank you for your help in understanding the problem. The problem is solved in version ... 8959#p8959

Best regards, Alexander

Post Reply