As in cases the page are not filled complete with text or grafics the jpg are wrong in size, i use a fix (changeable with parameters) size in all cases. Now all PDF are ok!
I use this function also to make a JPG-file (parameter cFile) from the preview.
I use this function also to make a JPG-file (parameter cFile) from the preview.
function Emf2Jpeg(.....cFile,nWidth, nHeight)
......
DEFAULT lFile := .F. , nWidth := 2000 , nHeight := nWidth * 1.414 //NEW
// cBuf := MemoRead( cEMF )
// oRect := TRect():New( 0, 0, (Bin2L( SubStr( cBuf, 21, 4 ) ) / 2)-5, (Bin2L( SubStr( cBuf, 17, 4 ) ) / 2 )-5 )
oRect := TRect():New( 0, 0, nHeight , nWidth ) //NEW