Hi JR
Correct me if I'm wrong, but there is only one thing that is failing. The PDF file does not load (an unsupported type), but LoadFromFile() does not return false (because wpcubed_pdfMakeImageExt() does not return an error result).
If you wanted, you could change the code in WPViewPDF_ReadImageStream() to something like:
...
if (res >= 0) then
begin
IOParams.ImageCount := PageCount;
if not Preview and (outmstream.Size = 0) then
raise PDFException.Create('Load of PDF failed');
if not Preview then
begin
outmstream.Position := 0;
aBitmap.LoadFromStream(outmstream);
Bitmap.CopyFromTBitmap(aBitmap);
if ( Bitmap.Width < 1 ) or ( Bitmap.Height < 1 ) then
raise PDFException.Create('Load of PDF failed');
IOParams.Width := Bitmap.Width;
IOParams.Height := Bitmap.Height;
end;
end
...
Nigel
Xequte Software
www.imageen.com