#1 2013-03-21 07:15:44

sridharxp
Member
Registered: 2013-03-21
Posts: 3

Papersize

Hi

Thanks for your great product.
I generate report from code.
I loaded rtf into TGDIPages and the layout is PERFECT.
Is there any other better way to design?

How to set paper size in TGDIPages?

Thanks

Offline

#2 2013-03-21 16:06:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Papersize

You can set the current printer paper size before calling TGdiPages.BeginDoc.
This is perfect for end-user GUI, but not convenient when creating reports in the background, e.g. to generate pdf files on the fly from a server.

I've added a feature request to make it more convenient.
See http://synopse.info/fossil/tktview?name=204b698b3d

Offline

#3 2013-04-01 15:24:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Papersize

That's it.

TGdiPages now handles several page layouts per report - see new overloaded TGDIPages.NewPageLayout() methods and also Orientation property which now allows several page orientations per report.

See http://synopse.info/fossil/info/de70dd67ab

Feedback is welcome!

Offline

#4 2013-04-03 11:59:09

sridharxp
Member
Registered: 2013-03-21
Posts: 3

Re: Papersize

Thanks Solved the problem.
Tested Using  GetPrinter and SetPrinter and Using new code. Both produced similar results.

The new function PdfCoord is in SynPdf and the function is used in mOrmReport. Should I set HasInline compiler setting in SynPdf?

AV when Preview is used. I think it tries to release something it should not.

Offline

#5 2013-04-03 17:04:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Papersize

HASINLINE is set by this included file in SynPdf.pas:

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64

What is the context of the AV?
I suppose it has been fixed by http://synopse.info/fossil/info/4bfe48c93c
Otherwise, we need additional information, and code to reproduce the issue.

Offline

#6 2013-04-10 11:31:50

sridharxp
Member
Registered: 2013-03-21
Posts: 3

Re: Papersize

Sorry this took me long. I thought at first that the AV might be multi threading issue. So that investigation took a lot of time. Now I think this might be due to non form class parent issue.
Description:
Preview was called from a function. The function was part of a simple class. Preview was displayed alright But closing the application produced AV. Not every time the error message was there.
If that function were a form method  display and closing of App was normal.
This might be a elementary mistake by me. If you like to see the function I shall post it.
Thanks for the support.

Offline

Board footer

Powered by FluxBB