Exporting ?‚¬ symbol in pdf

edited 12:33AM in FastReport VCL 5
Hello,

I recently switched to FR 5 and now when I export in PDF all my reports deigned with FR 4 the ??¬ "euro" symbol is shown as ?? char.
I try to embed fonts but I receive an access violation error probably due to the fact I'm exporting report for an Intraweb application and my frxPDFExport is configured as follow :
ExportFilter.PrintOptimized := True;
ExportFilter.ShowDialog := false;
ExportFilter.ShowProgress := false;
ExportFilter.OpenAfterExport := false;
ExportFilter.FileName := AOutputFilename;
ExportFilter.HideWindowUI := True;
ExportFilter.Compressed := True;
ExportFilter.CenterWindow := True;
ExportFilter.UseFileCache := False;

How can I show the ??¬ symbol correctly ?
I finished the application and I can't realease it cause to this problem.

Thank you,
Davide

Comments

  • gpigpi
    edited 12:33AM
    Attach your saved preview pages (fp3)
  • edited 12:33AM
    gpi wrote: »
    Attach your saved preview pages (fp3)

    Hello,

    after some tests I found the origin of the problem.
    Cause my Intraweb application runs as an ISAPI dll the localization settings are the same as the IIS process user account (which in my case is probably us-en).
    To avoid depending on the localization settings of the server where my application runs on is it possible to force the localization setting of the report by code ?

    Thank you,
    Davide
  • edited 12:33AM
    gpi wrote: »
    Attach your saved preview pages (fp3)

    Hello,
    I can't find a solution about formatting currency value...
    Now I set up correctly the user locale settings but as you can see in the attached files the currency format is wrong.

    Any suggestions will be appreciated.

    Thank you,
    Davide
  • gpigpi
    edited 12:33AM
    Your RapportoTessereAmountCharge have %2.2n format
    Attach report template with problem
  • edited 12:33AM
    gpi wrote: »
    Your RapportoTessereAmountCharge have %2.2n format
    Attach report template with problem

    Sorry, I upload the report I deployed at the moment (without ??¬ symbol).
    In the attached report the column <Balance.IncomeValue> has %2.2m format.

    Thanks,
    Davide
  • edited 12:33AM
    ruby wrote: »
    Hello,

    I try to embed fonts but I receive an access violation error probably due to the fact I'm exporting report for an Intraweb application

    Your access violation is probably caused by a bug with Fast Reports + XE7. If you have the source, I made a fix for it and you can apply and recompile.

    Change the source in unit frxCmapTableClass line 193 to the below:

    The solution was to get rid of casting a pointer to a dynamic array.
        function CmapTableClass.LoadSignedCmapSegment(segment_ptr: Pointer; segment_count: Integer ): TSmallintArray;
        var
          i: Integer;
          WordPtr : ^Word;
        begin
            SetLength(Result, segment_count);
            WordPtr := segment_ptr;
            i := 0;
            while ((i < segment_count)) do
            begin
                Result[i] := TTF_Helpers.SwapInt16(WordPtr^);
                inc(i);
                Inc(WordPtr);
            end;
        end;
    
  • edited 12:33AM
    Hello,

    I changed the code as you suggest and I recompiled all packages using the Recompile wizard utility but the "??¬" symbol is displayed like "??" in the exported pdf document.
    Is there a way to have the "??¬" symbol in pdf ?

    I think it is quite important that a currency symbol is displayed rightly in a report and exporting in pdf is a standard way to share a document.

    Thanks,
    Davide

    Bill E wrote: »
    Bill E wrote: »
    Hello,

    I try to embed fonts but I receive an access violation error probably due to the fact I'm exporting report for an Intraweb application

    Your access violation is probably caused by a bug with Fast Reports + XE7. If you have the source, I made a fix for it and you can apply and recompile.

    Change the source in unit frxCmapTableClass line 193 to the below:

    The solution was to get rid of casting a pointer to a dynamic array.
        function CmapTableClass.LoadSignedCmapSegment(segment_ptr: Pointer; segment_count: Integer ): TSmallintArray;
        var
          i: Integer;
          WordPtr : ^Word;
        begin
            SetLength(Result, segment_count);
            WordPtr := segment_ptr;
            i := 0;
            while ((i < segment_count)) do
            begin
                Result[i] := TTF_Helpers.SwapInt16(WordPtr^);
                inc(i);
                Inc(WordPtr);
            end;
        end;
    
  • gordkgordk St.Catherines On. Canada.
    edited 12:33AM
    try either not using the 2.2m add the symbol as text to the memo before the field expression or use custom format strings
  • edited 12:33AM
    The problem resides in the "??¬" char.
    I made a report that has only a TfrxMemoView component with a "??¬ test" string and the result was: "?? Test".

    Cause in may app there are several reports that refer to financial stats I can't release the application due to this problem.

    Any advice to workaround this problem is appreciated.

    Thanks,
    Davide

    gordk wrote: »
    try either not using the 2.2m add the symbol as text to the memo before the field expression or use custom format strings
  • gordkgordk St.Catherines On. Canada.
    edited 12:33AM
    what version of fr are you using 5.1.12 exports ok for me
  • edited 12:33AM
    I'm using the 5.1.12 too.

    Attached there is a zipped file which contains two project:
    Project1 is a standard VCL application and export right the report.
    Project2 is an Intraweb application where you can see the problem about the "??¬" char.

    Let me know if you find a solution or pheraps something I'm doing wrong in setting up the frxReport component.

    Thank you,
    Davide
    gordk wrote: »
    what version of fr are you using 5.1.12 exports ok for me
  • gordkgordk St.Catherines On. Canada.
    edited 12:33AM
    i ran your compiled intraweb project worked fine for me
  • edited 12:33AM
    if I view your pdf file on my PC (Win7 64) or on the server where I'm deployng my application (Win Server 2008 R2 Std) the "??¬" symbol is displayed as "??".
    I try on a Mac and "??¬" is correctly shown.

    After this test I changed the font from Arial to Tahoma and the "??¬" symbol was displayed correctly.
    what could it be the problem?

    It should not be the arial.ttf file cause after saving a Word document to pdf I can view the "??¬" symbol on the result pdf file.

    Thank you,
    Davide
  • edited 12:33AM
    Bill E wrote: »
    Bill E wrote: »
    Hello,

    I try to embed fonts but I receive an access violation error probably due to the fact I'm exporting report for an Intraweb application

    Your access violation is probably caused by a bug with Fast Reports + XE7. If you have the source, I made a fix for it and you can apply and recompile.

    Change the source in unit frxCmapTableClass line 193 to the below:

    The solution was to get rid of casting a pointer to a dynamic array.
        function CmapTableClass.LoadSignedCmapSegment(segment_ptr: Pointer; segment_count: Integer ): TSmallintArray;
        var
          i: Integer;
          WordPtr : ^Word;
        begin
            SetLength(Result, segment_count);
            WordPtr := segment_ptr;
            i := 0;
            while ((i < segment_count)) do
            begin
                Result[i] := TTF_Helpers.SwapInt16(WordPtr^);
                inc(i);
                Inc(WordPtr);
            end;
        end;
    


    Thank you, solved my AV problem.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.