Home General

Text objects shifts in PDF

edited March 2010 in General
I have a report that I uses both in a normal application and in a CGI
application (created using the Wizard in Delphi). In both cases the
report is printed as an PDF by printing to a memory stream and then
either writing the stream to a file or sending it to the web browser.

When done in the normal delphi application all looks fine, but when
executed from the CGI application most (but not all) text objects are
shifted, either vertically or horisontally or both. The images that
the report contains stays in the correct position, and so does lines
and shape objects.

I am using exactly the same code for generating the memory stream in
both applications - the only difference being how the stream is
handled after the report is finished, and the type of application of
course.

I am using Delpi 2007 and RB 11.08 (but the problem also existed with
RB 11.06).

/Jonas

Comments

  • edited March 2010
    Hi Jonas,

    This is not a known issue. What type of text components are having issues
    specifically? The PDF device simply receives a report page and generates
    each drawcommand according to its size and position values. My suggestion
    would be to create a minimal report that causes this issue (one text
    component), then trace into the TppPDFDevice.SavePageToFile routine to see
    if there are differences in the sent drawcommand's position when the report
    is run in Delphi and from the CGI app.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.