Page 1 of 1

export tprintpreview to pdf

PostPosted: February 18th, 2004, 3:30 pm
by matijsmoest
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.....

PostPosted: February 18th, 2004, 7:56 pm
by Johnny_Bit
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)

PostPosted: February 19th, 2004, 7:51 am
by matijsmoest
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?

PostPosted: February 19th, 2004, 3:22 pm
by Johnny_Bit
try to lower units (ex. from HiMetric to LoMetric).

PostPosted: February 19th, 2004, 11:10 pm
by Kambiz
How do you print the preview as PDF, using metafiles or direct print?

PostPosted: February 20th, 2004, 11:45 am
by matijsmoest
Via Metafiles..

PostPosted: February 20th, 2004, 10:05 pm
by Kambiz
PrintPreview's metafiles are in screen resolution, however if you stretch them on the target area, there should not be any problem.

PostPosted: February 24th, 2004, 10:04 am
by matijsmoest
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 ;)