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.Device_Info_GetProductName(VSTwain1.DeviceManager_SelectedDeviceIndex); VSTwain1.PdfEncoder_DocumentCreator := 'Demo App'; VSTwain1.PdfEncoder_DocumentModificationDate := FormatDateTime('dd/mm/yy hh:mm',now); // acquire image(s) from the device Repeat acquireModalState1 := VSTwain1.Device_AcquireImageModal(); // if image is acquired If acquireModalState1 = ACQUIREMODALSTATE_ImageAcquired Then Begin VSTwain1.AcquiredImages_Save(0,'c:\1\test.pdf'); // dispose an acquired image VSTwain1.AcquiredImages_Clear(); // 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;
Can you please advise if I have missed out something?
Philip L Jackson