#1 Re: PDF Engine » Newbie: Placing text on the page » 2013-09-23 16:29:40

I investigated my problem a little further and found out, that on the Webserver I can only print fewer lines on one page (related to totaldata's observation that a mm seems longer on his webserver).

Maybe it has todo with the fact that there's no printer or screen? Somewhere where the size of the Metafile is defined?

#2 Re: PDF Engine » Newbie: Placing text on the page » 2013-09-23 07:25:56

totaldata wrote:

I am developing a website that's output a pdf formula. The formula seems fine on my development computer, but when i place the program on our server the placement of text is changing. I would preciate some advice.
[...]
(missing the lower part of the printout, and also wider)

Maybe that is related to the problem I have, where the output is different (in the lower part of the page). Here, too, on development computer and in a desktop environment everything looks fine. On the Webserver the output is different.

http://synopse.info/forum/viewtopic.php?id=1417

#3 Re: PDF Engine » Problem with .DrawTextAcrossCols on Webserver only » 2013-09-18 08:06:43

Here's a Dropdown-Link to a zip containing the pdf (3 pages) and one emf for each page:

https://www.dropbox.com/s/sl5ck44eaf1hp … ND_EMF.zip

I hope, you can identify the problem.

#4 Re: PDF Engine » Problem with .DrawTextAcrossCols on Webserver only » 2013-09-17 12:37:18

Hello,
I can look at the file with the tool you named, but I don't know what to make of that, because it's way over my head.

Could I upload an emf or send one as an example to you by pn or email?

#6 Re: PDF Engine » Problem with .DrawTextAcrossCols on Webserver only » 2013-09-13 15:03:50

I'm using an older version where mormotreport.pas still runs by the name sqlite3pages.pas.

I'll try the latest version, later.


As to EMF. How can I export the pages to EMF?

Edit: I found out how to export each page to emf. I used the following code:

    for k := 0 to GDI.Pages.Count-1 do
      TMetaFile(GDI.Pages.Objects[k]).SaveToFile(EMFName(k));

The Result: The alternating lines are already missing in the EMF!


Next Edit:
Tried latest "unstable" and latest "Stable" version, using mormotreport.pas.
The Result: The backgound color of lines/rows are still missing after 2/3 of the page.

#7 PDF Engine » Problem with .DrawTextAcrossCols on Webserver only » 2013-09-13 12:41:52

Jumpy
Replies: 8

Hello,

I generate a PDF-Report with  SQLite3Pages that colors the background of the rows alternating gray and white using the following code:

//var GDI:TGDIPages;

  QH:=PWideChar(GetNextDataRow);
  if PrintBG then
    GDI.DrawTextAcrossColsFromCSV(QH,clSilver)
  else
    GDI.DrawTextAcrossColsFromCSV(QH);

That works in my Desktop Application without porblems.

The exactly same function to create the same PDF in my Webserver CGI-Application has problems. It stops alternating the background colors after ~2/3 of the page.

It is an Windows2000 Server with old IIS where no Printer is installed. IIS-Service runs under LocalSystem. I can only guess that it is related to the combination IIS/LocalSystem context, because (as a test) running the Desktop-Application on that Webserver created the PDF as desired.

I'm printing an A4 page and maybe the problem is, that somewhere the orientation gets messed up because there is no information about a printer or sth. The height of an A4 in landscape is about 2/3 of a page in portrait.

But it's only the colored background that is missing. The Text is there. If I use lines to separete the rows, using:
GDI.AddColumnHeadersFromCSV(QH, true, true); //true for GrayUnderlines
The gray lines will be drawn. Only the colored background boxes arround the last 1/3 rows are missing.

Looking in the .DrawTextAcrossCols function I see that the background is drawn on the canvas using FillRect(RowRect). But I don't understand enough of the sourcecode to see, if there's a problem with the coordinates of the Rect.

As it only happes in the Webserver, I don't know how to debug that properly.

Anyone an idea?

Jumpy

Board footer

Powered by FluxBB