Beiträge von mgpetryk

    Julian,

    I have built and forwarded you Mini.exe / source / map, along with several sample rtf files that show the issue everytime (for me).

    It will be interesting to find out what the problem is. I have uninstalled and totally re-installed WPTools 5.12 just to make sure it was nothing I introduced.

    Good Luck!

    Mike

    Julian,

    I just compiled mini.exe and did a file / load with one of my test rtf documents. It also produces many pages (complete with footers) every time I load the file.

    I ran the same rtf using WPT5TBXDemo and could not get it to produce the same results..

    Strange..

    Julian,

    I'm using the DLL in my app only and am the only developer. It's a large app so I'm breaking functionality out in DLL's.

    PageWidth = 15840
    PageHeight = 12240

    Pages look properly sized when viewing. First page contains the proper text, all other pages are blank but include the footer if one has been defined.

    Loading the first RTF usually works fine, when I load the second RTF that's usually when the problems start. I've traced it down to:

    in:
    WPRTEDefs / TWPRTFdatablock.getpagecount:

    FPageList.Count returns 671 which then becomes the page count

    I still need your help!

    Mike

    I've just converted from 5.10 to 5.12 and now when using LoadFromFile I'm getting 1,242,437 pages created in TWPToolsEditor.

    It was working 5.10

    I'm creating the editor in a DLL, here is my code:
    ---------------------------------------------------------------------------

    library WCEditor;

    uses
    SysUtils, Controls,
    Forms, WPRTEDefs,
    Classes,
    wpDefEditor;

    var
    DocEditor : TWPToolsEditor;

    function ShowPreview(AHandle: THandle; ACaption, FileName: pchar; GetVal, SetVal: pointer): Longint; stdcall;
    begin
    Application.Handle := AHandle;
    if DocEditor = nil then
    DocEditor := TWPToolsEditor.Create(nil);
    with DocEditor do begin
    Caption := ACaption;
    WPRichText.LoadFromFile(FileName, true);
    WPRichText.ClickableCodes := [wpobjMergeField];
    ShowModal;
    Application.Handle := 0;
    end;
    end;

    exports
    ShowPreview;

    begin
    end.

    While debugging, the file load up quickly but on the ShowModal command it pauses and creates the 1mil+ pages.

    Can someone give me an idea of where to start looking?

    Thanks!
    Mike

    I will see if I can adjust the printer driver. I've examined the emf file, and since it's mostly binary it's hard to determine much.

    I've tried printing on several HP printers and they all print it mirrored (inkjet and laser).

    Strange also, when I use the FLIP commands in wpForm for images, my computer reboots, probably a driver issue or something. More testing is in order. I'll try using other programs to create emf files and see if the problem is the printer driver I'm using.

    Thanks Julian,

    An Update: the EMF loaded into MS Word also looks fine, but prints backwards. So it's definitely a problem with the way the EMF was put together.

    Thank you for your help!

    Mike

    I'm using an EMF image as the background for a form. I can view it fine, and preview looks good also. When I print, the image is printed in mirror image format. Hold the print out up to the mirror, and you can read it fine. If I print to wPDF, everything ok.

    I also use wptools 5.1, when I insert the emf into a document, it views fine, print it to Adobe - everything ok, but when I print it to my HP printer, the RTF text is fine but the EMF image is mirrored.

    Maybe the EMF is corrupted. When viewed in MS Picture and Fax Viewer it views fine, but also prints in mirror format.

    Ideas?

    Thanks!
    Mike