Hi Easwar,
thank you for your quick response!
quote:
Originally posted by easwar
For EMF export, which is a vector type, DPI setting does not apply....one should be able to set the Width or Height of the export, and then the receiving application (such as Word) uses that info to render the image to have the set width/height.
I know this but I figured out that using the dialog from the file menu (export graph) the DPI setting results in different 1:1 representations in other applications. So in general Origin indeed seems to be able to export properly. That's why I tried to use the OIS settings as a workaround. Maybe you can have a look into this direction?
Unfortunately, I'm not able to set the dimensions at the output destination. I'm trying to include graph pages into flexGrid cells, which works pretty well for bitmaps, but EMF files are displayed so huge that one can see only some letters of the axis label.
PictureHolder pictHolder;
HENHMETAFILE hEMF = load_enhanced_metafile(strEMFPath);
pictHolder.CreateFromEnhMetafile(hEMF, true);
bool bRet = SetCellPicture(nCol, nRow, pictHolder);
and using
bool CFlexGridWrapperBOR::SetCellPicture(int nCol, int nRow, PictureHolder &pict)
{
_VARIANT vtPic;
vtPic = pict;
m_oFlexGrid.Cell(flexcpPicture, nRow, nCol) = vtPic;
return TRUE;
}
Unfortunately, only PictureControl objects can be scaled to fit their placeholder.
A (working) direct attach method would be even nicer:
bool CFlexGridWrapperBOR::SetCellEMF(int nCol, int nRow, GraphPage gp)
{
PictureHolder pictHolder;
page_get_picture(gp, pictHolder, "EMF", 72, false);
bool bRet = SetCellPicture(nCol, nRow, pictHolder);
return bRet;
}
Browsing OriginLabs' code I've found so many different export and attach methods, so I still hope one of them could be useful for this purpose ...
Michael