Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / ExtTextOut rectangle ignored ?
Author Message
BDauwe
# Posted: 31 Mar 2008 04:46


Hello,
its seems that the ExtTextOut dimension rectangle is ignored when calling this on a PDF->HDC. In my case, the rectangle is used to perform clipping on the text.
I've added a simple example demonstrating this problem:

CoInitialize(NULL);
IPDFDocument3* PDF = NULL;
CLSID clsid;
CLSIDFromProgID(OLESTR("PDFCreatorPilot3.PDFDocum ent3"), &clsid);

// create PDF Creator Pilot object
int cocre_rc = CoCreateInstance(clsid, NULL, CLSCTX_ALL,__uuidof(IPDFDocument3), (LPVOID*)&PDF);
if (cocre_rc != S_OK)
return -1;

// initialize PDF Engine
PDF->StartEngine("hugo.callens@radaraut.com", "FYEHG-RNKUQ-SK3Q5-2VS9Q");
PDF->FileName = "c:temptodel.pdf";

PDF->AutoLaunch = true;
// PDF->UseScreenDC = true;

// start document generation
PDF->BeginDoc();
PDF->UseScreenDC = true;
HDC hdc_pdf = (HDC)PDF->HDC;

char * txt = "This text should be clipped";

int horz_offset = 10;
int vert_offset = 100;
int width = 50;
int height = 30;

SelectObject(hdc_pdf, GetStockObject(LTGRAY_BRUSH));

RECT rect;
rect.left=horz_offset;
rect.top=vert_offset;
rect.right=horz_offset+width;
rect.bottom=vert_offset+height;
Rectangle(hdc_pdf, 0, 0, PDF->PageWidth, PDF->PageHeight);
Rectangle(hdc_pdf, rect.left, rect.top, rect.right, rect.bottom);
ExtTextOut(hdc_pdf, horz_offset, vert_offset, ETO_CLIPPED | ETO_OPAQUE, &rect, txt, strlen(txt), NULL);

PDF->EndDoc();
// disconnect from library
PDF->Release();

// uninitialize OLE libraries
CoUninitialize();

return 0;

Vitaliy Shibaev
Member
# Posted: 2 Apr 2008 02:28


Hi,

Yes, it's known problem. At the moment our library is not supported ETO_CLIPPED flag in ExtTextOut. Thank you for information!

Best regards,
Vitaliy Shibaev
Two Pilots

BDauwe
Member
# Posted: 2 Apr 2008 08:33


ETO_CLIPPED used to work with version 2.x.
We need to migrate to version 3.x because 2.x does not install under Vista, but because of this problem, we can't migrate !

Any estimate on when this problem will be fixed ?

BDauwe
Member
# Posted: 4 Apr 2008 07:00


Could you please provide an estimate for this bugfix. We need to plan and inform our customers as to when Vista will be supported.

If no solution is foreseen on short term, we'll need to start investigating other libraries.

Vitaliy Shibaev
Member
# Posted: 4 Apr 2008 12:20


Hi,

We try to resolve this and it turned out quite easy. So we resolve this bug and at the beginning of the next week we construct intermediate build with this fix. If you are our client write us through support form.

Best regards,
Vitaliy Shibaev
Two Pilots

BDauwe
Member
# Posted: 8 Apr 2008 09:46


I am a customer and will get in touch through support. Thanks a lot for the quick intervention.

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.015

 

Page top