Thanks to visit codestin.com
Credit goes to github.com

Skip to content

EMF with rotated text #65

@giovanierthal

Description

@giovanierthal

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions