You are not logged in.
Pages: 1
Hello all. I have been using synopse PDF with delphi very well for a while. I am having trouble understanding relative vs. absolute positioning.
I am drawing on the canvas assuming a printer has a resolution of 600 x 600 dpi, so if I draw a rectangle at 600,600 to 1200,1200, this should theoretically print a one inch square etc.
When I print the drawing, if I don't choose scale to fit page, the drawing is skewed, such that the width is about on half of the height of my rectangle! I need to assure that the output is absolute, because I'm printing on three hole paper, etc.
I did set the ScreenLogPixels to 600, although there seems to be a separate scale for x and y ... Any thoughts?
procedure HappyPrint;
QPDF: TPdfDocumentGDI;
QPage : TPdfPage;
begin
//prints directly to PDF.
try
try
if Self.gtPDFDocument1.IsLoaded then begin
Self.gtPDFDocument1.Reset;
Self.gtPDFDocument1.Filename:='';
end;
if (not (Self.gtPDFViewer1=nil)) then
Self.gtPDFViewer1.PDFDocument:=nil;
QPDF:=TPdfDocumentGDI.Create;
QPDF.EmbeddedTTF:=False;
QPDF.CompressionMethod:=cmNone;
QPDF.ScreenLogPixels:=GCPDFxResolution;
QPDF.NewDoc;
QPage:=QPDF.AddPage;
QPDF.VCLCanvas.MoveTo(600,600) etc...
Offline
Thanks, Adminitrator Ab
Well how do you set the VCL resolution?
Could you make a small example? Is there a X and Y resolution for the VCL canvas?
Thanks@
Fritz
Offline
Pages: 1