• I'm trying to export some pdf pages to jpg images. Some archieves aren't exported as viewed on acrobat. Some pages are displayed on Portait and are exported as landscape.

    I'm try to change the page rotation to zero, but nothing happens. What shoud i do?

    Here is the code part:

    Code
    //Looping start somewhere.....
          liOrientation:= GetPageOrientation(wpPDF, liCurrentPage); //This function just return the COMPDF_GetPageRotation from current page
          if liOrientation <> 0 then
            wpPDF.CommandEx(COMPDF_SetPageRotation, 0);
    
          wpPDF.CommandEx(COMPDF_MakeJPEGSetRes, 100);
          lsFileName:= Format(Concat(IncludeTrailingBackslash(DestFolder),    DestFileName), [liCurrentPage+1]);
          wpPDF.CommandStr(COMPDF_MakeJPEG, Format(STRPARAM_MakeJPEG, [liCurrentPage, lsFileName]));
          inc(liCurrentPage);

    When liOrientation = 0, the page are exported exacly how it's viewd on adobe.

  • I'm so silly.

    I do not know pdf very well. When i scan a large documento, my scanner define a rotation value, so the document will be rotated by acrobat to be displayed as i (i = my client) defined on scan options.

    I just rotate the output, using TJPEGImage class, if liOrientation is not equals to zero.

    Thats it.