export tprintpreview to pdf

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

export tprintpreview to pdf

Postby matijsmoest » February 18th, 2004, 3:30 pm

I want to export de printpreview to a pdf-file.
I have an lib to write on the canvas of a pdf-file.

But the resolution of the printpreview is a lot bigger as a pdf file.

Is there some way to scale the canvas or first export is to an image.....
matijsmoest
Member
Member
 
Posts: 4
Joined: February 18th, 2004, 3:26 pm

Postby Johnny_Bit » February 18th, 2004, 7:56 pm

heh.. i usually use wn2pdf ghostprinter, but if you have lib, then maybe it's some way restricted to low resolution? (i can print on it with really high resolution)
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby matijsmoest » February 19th, 2004, 7:51 am

this is solution!

but I want to have everything in my own application.
now I have a resolution of 21000*29700 with tprintpreview.

when i write the canvas of tprintpreview on a canvas of a pdf-file I see nothing. If I'm lucky the topleft of the border.

does anybody have experience with this problem?
matijsmoest
Member
Member
 
Posts: 4
Joined: February 18th, 2004, 3:26 pm

Postby Johnny_Bit » February 19th, 2004, 3:22 pm

try to lower units (ex. from HiMetric to LoMetric).
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » February 19th, 2004, 11:10 pm

How do you print the preview as PDF, using metafiles or direct print?
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby matijsmoest » February 20th, 2004, 11:45 am

Via Metafiles..
matijsmoest
Member
Member
 
Posts: 4
Joined: February 18th, 2004, 3:26 pm

Postby Kambiz » February 20th, 2004, 10:05 pm

PrintPreview's metafiles are in screen resolution, however if you stretch them on the target area, there should not be any problem.
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby matijsmoest » February 24th, 2004, 10:04 am

expbmp := TBitMap.Create;
expbmp.Width:=2100;
expbmp.Height:=2970;

Windows.PlayEnhMetaFile( expbmp.Canvas.Handle,
PrintPreview1.Pages[ 1 ].Handle,
Rect( 100, 100, 2100, 2970 ) );


This works ;)
matijsmoest
Member
Member
 
Posts: 4
Joined: February 18th, 2004, 3:26 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 3 guests

cron