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


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Page clipped with no printer
Author Message
Andrei
# Posted: 23 Jul 2007 08:57


Using version 3.4 and having no printer installed, run the following:

// initialize PDF Engine
PDF->StartEngine("demo","demo");
// set PDF ouput filename
PDF->FileName = "HelloPDF_VC.PDF";
PDF->AutoLaunch = true; // auto-open generated pdf document

// start document generation
PDF->BeginDoc();
// draw "HELLO, PDF" message on the current PDF page

// draw text
int i;
for( i = 0; i < 40; i++)
{
RECT R;
R.bottom = 400+i*30;
R.right = 400;
R.left = 10;
R.top = 10+i*30;
DrawText((HDC)PDF->HDC,"HELLO, PDF!",11,&R,DT_LEFT);
}

// finalize document generation
PDF->EndDoc();

The text is clipped at the bottom of the page.

Best wishes,
Andrei

Stanislav
Member
# Posted: 24 Jul 2007 00:18


Dear Andrei,

Please download latest version of the library and test it.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Stanislav
Member
# Posted: 24 Jul 2007 00:24


Dear Andrei,

Please note also that coordinates for your rectangle should be scaled using aspect ratio between used DC resolution and default PDF resolution.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

 

 

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

 

Page top