#1 PDF Engine » some modification for matrix printer » 2016-04-07 13:32:05

nzsolt
Replies: 7

I have made some hack for Epson matrix printer with different X,Y DPI.
There is ScaleX and ScaleY in RenderMetaFile function.

You can download and merge the source from here:

nzsolt13.atw.hu/SynPdf.pas

#2 Re: PDF Engine » font position problem » 2010-11-18 08:52:59

It's solved! The TTF file was bad, after doing an AutoMetrics (in FontCreator), the printed pdfs are good.
Thanks for this great tool!

#3 Re: PDF Engine » font position problem » 2010-10-08 12:25:44

I try the xpdf.UseUniscribe:=True but nothing changed, the letters appear but wrong postion,
it is look like it draws the first carachter and the next one hasn't width or width=0 and give the same postion like the first character.

#4 Re: PDF Engine » font position problem » 2010-10-08 05:12:34

Maybe the TTF file cause the problem, because the standard windows fonts appear good.
I made another test package (you can download from here http://www.nodesystems.hu/pdftest2.zip)
There are a metafile and a pdf in it. The Times New Roman text is good.

Our pas was changed to:  (for resizing and margin handling)

   ...   
   xPDF.AddPage;
   sc:=(xpdf.DefaultPageHeight*Screen.PixelsPerInch/72)/PageSize.Y;
   xPDF.Canvas.RenderMetaFile(meta,sc,XOff*sc,YOff*sc*-1);
   ...

Thanks!

#5 PDF Engine » font position problem » 2010-10-03 10:00:15

nzsolt
Replies: 7

Hi,

synpdf is a great tool, thanks for it!
It works, but there is a problem with a compressed font.
The letters position is not good, all are the same.
I made a test package: (you can download from here http://www.nodesystems.hu/pdftest.zip)
it contains the ttf file, a meta file (which is good) and the pdf (with wrong letter position)

Can you tell what is the solution?

Our pdf maker pas source:

procedure TMyPrinter.SaveToPDF(const TheFile : String);
var i:integer;
    xPDF:TPdfDocument;
    meta:TMetaFile;
begin
try
  xPDF:=TPdfDocument.Create;
  xPDF.NewDoc;
  for i:=1 to PageCount do
  begin
   meta:=MetaFiles[ i ];
   xPDF.AddPage;
   xPDF.Canvas.RenderMetaFile(meta);
  end;
  xPDF.SaveToFile(TheFile);
finally
  xPDF.Free;
end;
end;

Thanks!

Board footer

Powered by FluxBB