Beiträge von jon_bondy

    When I generate a PDF on my Win XP development VM, the PDF is created as expected. When I create the same PDF on a Win 7 64 bit system, one of the smaller fonts is rendered larger than expected, which causes cosmetic errors. I guess this is because some font that is present on the Win XP system is absent on the Win 7 64 system.

    Is this a known problem? Is there a work around? I can't really install new fonts on all of my customers machines.

    The fonts in question are Arial 5, 8, and 9

    I am using release 3.62.0.1 and Delphi 7

    Thanks!

    Using wpTextAsGlyphs, for Chinese reports, our PDFS are increasing from 450KB to 7700KB, almost a factor of 16! Is there any way around this?

    We are also seeing cosmetic anomalies in the reports (see the two screen shots, below). Is this a known bug? Has it been fixed?


    In addition, below please find URLs for four PDF files. They are in pairs, one pair for Linearity, and one pair for Simple Precision (SP). Each PDF was generated either with Glyphs or without Glyphs. I have annotated each PDF to indicate the places where cosmetic defects can be seen. I wonder if the sizes (heights and widths) of the various strings are being computed incorrectly within the PDF Canvas, since the code to generate each does not change. Incorrect string heights and widths might explain the incorrect positioning of strings on the PDF Canvas:


    Using wpTextAsGlyphs, for Chinese reports, our PDFS are increasing from 450KB to 7700KB, almost a factor of 16! Is there any way around this?

    We are also seeing cosmetic anomalies in the reports (see the two screen shots, below). Is this a known bug? Has it been fixed?


    In addition, below please find URLs for four PDF files. They are in pairs, one pair for Linearity, and one pair for Simple Precision (SP). Each PDF was generated either with Glyphs or without Glyphs. I have annotated each PDF to indicate the places where cosmetic defects can be seen. I wonder if the sizes (heights and widths) of the various strings are being computed incorrectly within the PDF Canvas, since the code to generate each does not change. Incorrect string heights and widths might explain the incorrect positioning of strings on the PDF Canvas:


    I am having problems writing some Chinese characters to a PDF using wPDF 3.62.0.1. I wrote a small program to read text from a file and write it to the PDF. The code structure is arcane, because it mimics the structure of the actual application: I know that it could be written in a less convoluted manner.

    Please download http://www.jonbondy.com/wPDF-Chinese.ZIP to see the following files:

    Chinese Text.txt: contains the Chinese text that is used to create the PDF;

    PdfTest.dpr, pas, and dfm: the test program itself

    Test.pdf: the output of the test program

    Test Chinese PDF.PNG: this shows the Chinese Text.txt file and the Test.pdf file, on a computer that has the Chinese character set installed. If you look carefully, you will see 4 blue boxes on the PDF that highlight the four characters that are displaying as "?" rather than correctly. If you look at the Notepad image, you will see the correct underlying text.

    Is this a known bug? Is there a workaround or fix?

    Thank you!

    Jon

    I'm trying to write a watermark over the top of a PDF page. The idea is to draw in a large font, at an angle, but only draw the outline of the characters.

    I establish the rotation using the following code, where "h" is the height of the canvas:

    SetGraphicsMode(Canvas.Handle, GM_ADVANCED);
    angle := -52.3 * pi / 180;
    x0 := 0;
    y0 := h;
    xForm.eM11 := cos(angle);
    xForm.eM12 := sin(angle);
    xForm.eM21 := -sin(angle);
    xForm.eM22 := cos(angle);
    xForm.eDx := x0 - cos(angle)*x0 + sin(angle)*y0;;
    xForm.eDy := y0 - cos(angle)*y0 - sin(angle)*x0;
    SetWorldTransform(Canvas.Handle, xForm);

    I then write the text using the following code:

    OldBkMode := SetBkMode(Canvas.Handle, TRANSPARENT);
    BeginPath(Canvas.Handle);
    Canvas.TextOut(X, Y, Text);
    EndPath(Canvas.Handle);
    StrokePath(Canvas.Handle); // was StrokeAndFillPath
    SetBkMode(Canvas.Handle, OldBkMode);

    This approach works fine when tested with a TImage.Canvas, but fails when using the pdf.Canvas, because the hollow character outlines are always filled in in the PDF.

    Any thoughts?

    Thank you!