Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMF with rotated text #65

Open
giovanierthal opened this issue Apr 3, 2023 · 0 comments
Open

EMF with rotated text #65

giovanierthal opened this issue Apr 3, 2023 · 0 comments

Comments

@giovanierthal
Copy link

When drawing an EMF (test.zip), rotated texts are ignored:

PDF output:
image

EMF content:
image

var
    Metafile : TMetafile;
    FPdfDoc : TPdfDocumentGDI;
begin
    Metafile := TMetafile.Create;
    try
        Metafile.LoadFromFile ( 'test.emf' ) ;

        FPdfDoc := TPdfDocumentGDI.Create;
        try
            FPdfDoc.PDFA1 := True;
            FPdfDoc.EmbeddedTTF := true;
            FPdfDoc.EmbeddedTTFIgnore.Text := MSWINDOWS_DEFAULT_FONTS;
            FPdfDoc.EmbeddedWholeTTF := true;
            FPdfDoc.UseUniScribe := True;
            FPdfDoc.CompressionMethod := cmFlateDecode;
            FPdfDoc.UseFontFallBack := True;

            FPdfDoc.ScreenLogPixels := 600;
            FPdfDoc.DefaultPaperSize := psA4;
            FPdfDoc.DefaultPageLandscape := False;

            FPdfDoc.AddPage;
            FPdfDoc.VCLCanvas.Font.Charset := ANSI_CHARSET;
            FPdfDoc.VCLCanvas.Font.PixelsPerInch := 600;

            FPdfDoc.VCLCanvas.Draw ( 0 , 0 , Metafile ) ;
            FPdfDoc.SaveToFile ( 'test.pdf' ) ;
        finally
            FPdfDoc.Free;
        end;
    finally
        Metafile.Free;
    end;
end;

Any tips?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant