Landscape and StartPageEx Bug?

  • I am adjusting the dimensions of my page to print landscape. I am NOT rotating the text. I am creating the CDC with the correct orientation.

    Originally, I was using wPDFControl01.dll 2.1.0.0 and the call.

    Code
    m_pPDFExport->StartPage();


    Because I am creating the CDC with the correct orientation, this worked.

    I am now using wPDFControl01.dll 2.5.6.2. The previous call did not work. So I changed it to:

    Code
    int width = pDC->GetDeviceCaps(HORZRES);int height = pDC->GetDeviceCaps(VERTRES);m_pPDFExport->StartPageEx(width,height, 0);


    This did not work. The page still looked normal orientation. However, when I changed it to add just a little bit to the width, the page had the correct height and width.

    Code
    m_pPDFExport->StartPageEx(width+3,height, 0);

    I also tried adding just 1 and 2 units, but that did not work. My final workaround multiplied the width by 1.001 so it would have a better chance of working with other page sizes.

    Is there a fix for this? If not, will this workaround work reliably?

    Mark Griebling
    MAG Softwrx, Inc.