Beiträge von JazzMan

    Kym,

    As a long-time developer who has owned many third-party libraries over the last three decades, I can say without reservation that you will never experience better support than with any of the products from WPCubed.

    And no, I'm not associated with the company in any way, I'm merely one of many VERY satisfied owners of the WPTools product!. Run, don't walk, to get it!

    The instance cited here in this post, where a question wasn't answered promptly, is definitely the exception, rather than the norm. Support from them is, in my experience, unparalleled. And oftimes suggestions or questions that lead to solutions are incorporated into subsequent releases. The product is constantly evolving, many features the direct result of users' requests or problems.

    I should have added in my prior post that another reason to ask questions on the Forum, rather than via private email, is it saves Tech Support from answering the exact same question many many times! As developers ourselves, we've been through that movie often...:-) And it makes this Forum as useful, if not even more so, than ANY Help file or FAQ! Have a problem? Just do a Search in the Forum. If you have a question, chances are someone else has already asked it..

    You ask about who handles the replies. With this Forum, not only do you get responses from the developer, many times answers, suggestions, solutions, and examples are provided by any of a number of "power users" (as you'll see if you read through the various posts).

    One criterion you need to ask yourself while looking for controls is: How long has this company been around? Are they new to the scene? If so, steer clear, you have no way of knowing they're going to be around for the long haul. I'm not sure when WPCubed started, but I've personally been using WPTools for over seven years now, starting with Version 2. THIS company is here to stay.

    Add yourself to the WPTools family, you'll be glad you did, and wonder how you got by without it. I'd tried several of the alternative products out there, and they paled by comparison.

    Regards,
    richard diamond

    If I can add something here.....

    Another advantage of using the Forum, rather than email, is that everyone else gets to benefit from both the question and Support's answer. The Forum becomes, in effect, a Knowledge Base. Use email, and only the person sending it in finds their answer, which means if you have the same question, you won't know the answer!

    As for rapidity of reply, also keep in mind timing differences. I'm not sure where you are located, but I'm in the United States, wheres WPTools Support is German-based. Therefore the window of time between the two, when both of us are up and working, is quite small. Unless I time it JUST right, they're already getting ready for their evening while I'm just getting started - that means a day goes by before they can even possibly respond! Either way, you'll find Support's response is like no other...:)) I've gotten spoiled!

    Regards,
    richard diamond

    quicoli,

    Like you, I went from 3.12 (or so) to 5, skipping V4 entirely. And like you, there were a lot of documents (thousands in my case) in the hands of my users out there, all chock full of merge codes. NO problems or gotchas were experienced.

    Yes, you'll have to think of merge codes slightly differently in V5 than you're used to, but, my advice, RUN don't walk to the upgrade if you haven't already done so. You'll be glad you did!!!

    Regards,
    richard diamond

    Anthony,

    There's no such thing as a dumb question, there's only my dumb answers...<g>.

    You should find an email from WPTools Support giving you the URL to go to, as well as your Login-Name and Password you'll need to access it.

    To get to the source download area to get the latest and greatest simply:

    1) go to https://www.wpcubed.com
    2) click on "Support" (just below the header graphic)
    3) click on "Customer Login".

    Voila. You're there, ready to provide your Login-Name and Password.

    Hope that helps...:)

    Regards,
    richard diamond

    Dr. Bob,

    There's one more feature I should mention, column breaking, since it sounds like you'd want it after the image is inserted.

    To force a column break at any arbitrary place in the text, use something along the lines of

    Code
    include( WPRichText1.ActiveParagraph.prop, paprNewColumn );


    You can also do this within the BeforeInitializePar event. Just as the event's name implies, it's fired up before a paragraph is initialized. It allows you to prepocess a paragraph. For instance, you might want to hide a certain paragraph "include(par.prop, paprHidden)".

    I hope this helps you...:)

    Regards,
    richard diamond

    Bob,

    Not only is it possible, but Julian has made it extremely easy with WPTools 5 (in prior versions, I had to write reams of code to achieve the same effect).

    To set columns, simply use the paragraph properties WPAT_COLUMNS (which is the number of columns), WPAT_COLUMNS_X (the horizontal gap between columns), and WPAT_COLUMNS_Y (the height of the columns) within the ASet method.

    Code
    WPRichText1.ActivateParagraph.ASet( WPAT_COLUMNS, 3 ); // set 3 columns, a gap of 0.25 inch between 'emWPRichText1.ActivateParagraph.ASet( WPAT_COLUMNS_X, WPInchToTwips, 0.25 ) ); // set a 0.25 inch gap between 'em


    Then, to turn column mode off, simply

    Code
    WPRichText1.ActivateParagraph.ASet( WPAT_COLUMNS, 1 ); // back to one column
    WPRichText1.ActivateParagraph.ADel( WPAT_COLUMNS_X); // no more gap


    Please note this is not a feature in the "standard" version of WPTools. It's available only in the upgrade "Premium" version. If you haven't done so already, this is a "must buy" in my opinion - far more than worth the additional cost, as it gives you the complete source to WPTools, and is essential for modifications or extensions, as well as understanding the innards of the product. In addition, it gives you the ability to have "text frames", a feature I use extensively, and consider one of the sexier features in WPTools.

    Now, on a personal note......

    This has absolutely nothing to do with your question, but I can't help myself. When I saw "DrBob42", I wondered if this was the DrBob. Then, seeing Bob Swart, I knew indeed I was in the presence of celebrity (<bowing>). Welcome to the group, Sir...:)))

    As a relatively veteran user (since 1998) of Julian's marvelous creation, I know you'll be happy with WPTools - and extremely pleased with the responsiveness of support, which is unparalleled.

    Regards,
    richard diamond

    Jeremy,

    My pleasure. Again, it's possible that since Julian's post of some time ago that he's since added a straightforward way to control all this (Julian?).

    You might want to modify this to suit your particular needs, or paper sizes that interest you. Still, this should get you started.

    Code
    procedure TForm.SetPrinterPageSize;var  Device, Driver, Port: array[0..255] of Char;  pDevMode     : PDeviceMode;  hDevMode     : THandle;  w, h         : integer;  bLetter      : boolean;  bLegal       : boolean;begin  if( bOnlyUsePrintDriver ) then    exit;  bLetter      := FALSE;  bLegal       := FALSE;  try    Printer.GetPrinter(Device, Driver, Port, hDevMode);    pDevMode     := GlobalLock(hDevMode);    if( pDevMode <> nil ) then begin      if( ( pDevMode^.dmFields and DM_PAPERSIZE ) <> 0 ) then begin     (* this bLetter and bLegal stuff is because I can't depend on the page size being correctly set;        I've seen the page size set to User Defined (even though the page dimensions are right *)        bLetter  := ( WPRichText1.Header.PageSize = wp_Letter );        if( not bLetter ) then          bLetter  := ( ( ( WPRichText1.Header.Landscape = FALSE ) and                          ( WPTWipsToInch( WPRichText1.Header.PageHeight ) = 11 ) and                          ( WPTWipsToInch( WPRichText1.Header.PageWidth ) = 8.5 )                        ) or                        ( ( WPRichText1.Header.Landscape = TRUE ) and                          ( WPTWipsToInch( WPRichText1.Header.PageHeight ) = 8.5 ) and                          ( WPTWipsToInch( WPRichText1.Header.PageWidth ) = 11 ) ) );        if( (             not bLetter             )  and                          bBooklet                   ) then          bLetter  := ( ( WPTWipsToInch( WPRichText1.Header.PageHeight ) = 8.5 ) and                        ( WPTWipsToInch( WPRichText1.Header.PageWidth ) = 5.5 ) );        if( not bLetter ) then begin          bLegal   := ( WPRichText1.Header.PageSize = wp_Legal );          if( not bLegal ) then begin            bLegal   := ( ( ( WPRichText1.Header.Landscape = FALSE ) and                            ( WPTWipsToInch( WPRichText1.Header.PageHeight ) = 14 ) and                            ( WPTWipsToInch( WPRichText1.Header.PageWidth ) = 8.5 )                          ) or                          ( ( WPRichText1.Header.Landscape = TRUE ) and                            ( WPTWipsToInch( WPRichText1.Header.PageHeight ) = 8.5 ) and                            ( WPTWipsToInch( WPRichText1.Header.PageWidth ) = 14 ) ) );   // check for 17" legal size (a bit of a legacy condition, but hey....            if( not bLegal ) then              bLegal   := ( ( ( WPRichText1.Header.Landscape = FALSE ) and                               ( WPTWipsToInch( WPRichText1.Header.PageHeight ) = 17 ) and                              ( WPTWipsToInch( WPRichText1.Header.PageWidth ) = 8.5 )                            ) or                            ( ( WPRichText1.Header.Landscape = TRUE ) and                              ( WPTWipsToInch( WPRichText1.Header.PageHeight ) = 8.5 ) and                              ( WPTWipsToInch( WPRichText1.Header.PageWidth ) = 17 ) ) );          end;        end;        if(           bLetter or bLegal or bNormal11x17            ) then begin          if(          bLetter          ) then            pDevMode^.dmPaperSize := DMPAPER_LETTER          else if (          bLegal           ) then            pDevMode^.dmPaperSize := DMPAPER_LEGAL;          pDevMode^.dmFields := pDevMode^.dmFields OR DM_PAPERSIZE;          Printer.SetPrinter(Device, Driver, Port, hDevMode);        end;      end;      // now deal with orientation      if(          WPRichText1.Header.Landscape       ) then         pDevMode^.dmOrientation := DMORIENT_LANDSCAPE      else        pDevMode^.dmOrientation := DMORIENT_PORTRAIT;      pDevMode^.dmFields := pDevMode^.dmFields OR DM_ORIENTATION;        Printer.SetPrinter(Device, Driver, Port, hDevMode);    end;  finally    GlobalUnlock(hDevMode);  end;end;


    Here's some other code you might find helpful. This snippet allows checking if the printer can collate:


    I also have some code that checks for duplex ability, but it's seriously twisted.

    If smoke comes out your printer, it ain't my fault. However, I can tell you I've been using this code since Julian's unveiling of WPTools 5, and it's behaved for me.

    Hope this helps!
    richard diamond

    Jeremy and Rob (and anyone ELSE that might be interested in this),

    If Julian indicates it's still the case that :

    Zitat

    at present time the printing code does not select any paper size at all.

    and

    Zitat

    Courrently you need to settup the paper size in the Printer before you do the printing.


    then I have some code I'd be happy to share with you that sets the printer's page size prior to printing so you don't have to. It's pretty straightforward, using

    Code
    Printer.GetPrinter(Device, Driver, Port, hDevMode);
    ... code in here to set printer properties based on WPRichText's page size, then...
     Printer.SetPrinter(Device, Driver, Port, hDevMode);


    Regards,
    richard diamond

    Casper,

    I'll give this my best shot.

    LoadOptions is a property of TWPRTFEngineBasis, which is why you didn't find it as a Header property. However, it's been kinda demoted in the scheme of things.

    For WP5, I suggest you use the format strings, such as TextLoadSaveOptions. This is invoked by either using the optional arguments to Load and Save.

    For example, you might use:

    Code
    WPRichText1.LoadFromFile( 'Comments.RTF', TRUE, 'RTF-IgnoreFonts' );

    Whatever you put there is passed to load and save methods (e.g., LoadFromFile or SaveToFile), and also in the properties TextLoadFormat and TextSaveFormat.

    Although my example selects the RTF reader, you can select any of them that way, be it HTML or WPTools - just replace the substring 'RTF' with 'WPTools' or 'HTML'. Just make sure you precede the options in the format string with a minus sign, as I show above.

    Oh, and case doesn't matter, as the arguments are converted to lowercase within Julian's code, so pass them in whatever casing style you prefer..:)

    For a current list of the various options, check out:


    And, as always, I defer to any corrections / clarifications that Julian will add to what I say here.

    I hope this points you in the right direction..:)

    Regards,
    richard diamond

    Andi,

    Until Julian can reply, perhaps I might be of some help here.

    Zitat

    2.) If i export the text as text, i loose the font information (which is included into the PDF)


    Specifically what do you have FontMode set to? There are a number of choices, some yielding better results than others as far as retaining font information.

    Also, in case you're not aware of this, Adobe has an option "Use Local Fonts" that can make a huge difference in the appearance of the text. In Adobe 5 it's in the View menu option, in Adobe 7 the switch is in Advanced | Use Local Fonts.

    You'll find that some fonts won't render well no matter what, losing information (for example, italics). From what I've seen, that happens with some "rogue" fonts (fonts that are perhaps a bit less well constructed than others). I've found that sometimes switching fonts from one to a similar, more "conventional" font can help matters out.

    Regards,
    richard diamond

    Julian,

    I'm sure it's totally obvious how do this, but I'm missing it.

    How do I programmatically execute a SelectAll on the text in a specific text frame?

    The answer to this question will tell me how I perform other TWPRichText-type commands as well.

    Thanks!

    diamond

    Julian,

    As I thought this through, I'm unclear how to approach it.

    Since the PDF output consists of any number of documents, all ultimately stitched together by doing a [PDF Export].BeginDoc at the start, and a [PDF Export].EndDoc at the end, how is the TableOfContents approach going to know about the various marked paragraphs within each separate document being stitched together? Also, how do I issue the CreateTableOfContents at the end so that the created Table of Contents is at the beginning of the PDF output, before all the already output documents being sent to the PDF file?

    I know those questions are terribly worded, but I'm hoping you understand what I'm trying to get at!

    If everything were contained in one document, this would be a simple matter, I'm sure. But since these are in effect separate document runs, all contained within the BeginDoc / EndDoc, how would TableOfContents approach be implemented?

    diamond

    Julian,

    Hello..:)

    I have a question about the Table of Contents feature. Does it allow me to click (or double click) on an item in the Table of Contents and have the text cursor jump to that item in the document?

    If not, how would I do this? Maybe the Table of Contents feature isn't the way I want to do this?

    Specifically I need this ability to navigate around in a PDF-exported document. The pdf fle is in effect a "batch print document", with the output of the documents for many different employees combined in the one pdf file.

    I want the first page of the PDF (or more pages, depending upon how many employees there are), to consist of one line for each employee's name. You click on their name, and I'm brought directly to that EE's document within the PDF file.

    In V3 I was doing this by first looping through all employees I'm about to process, writing out one line per employee using

    Code
    InputHyperlink( strEmployeeName );

    then issuing a form feed when done with the pre-pass, then, for each employee, producing the actual output and inserting something like the following in WPDFExport1AfterPrintPage:

    Code
    WPPDFExport1.Source.SetPosition( 0, 0, 0, 0 );
       WPPDFExport1.SetBookmark( strEEID,
                                 WPPDFExport1.Source.GetXPositionTw,
                                 WPPDFExport1.Source.GetYPositionTw );

    (being sure to only do this on the employee's first page.

    This still kind of works in V5, but I'm wondering if there's a cleaner, less round-about way?

    Thanks!

    Regards,
    diamond

    Not printing the way you do, I can't say for sure, but it's worth your trying to insert a reset of the cursor position between the two Print statements, in case the first Print statement moves the cursor along as it prints, so that when it's done, the cursor (and active position) is at the end of the document.

    In other words, perhaps try this:

    Code
    Form1.WPR1.Print;
    Form1.WPR1.CPPosition := 0;
    Form1.WPR1.Print;


    It's worth a shot!

    Regards,
    richard diamond

    Julian,

    I came up with the following solution:

    That seems to work fine, however I'm sure you have a cleaner solution, so I'm all eyes...:) I'd like to see your approach!

    This *does* allow me to use the significantly smaller file size of the jpg image over the bmp. For example, one of the bmp's is 12 megs, the same jpg is half a meg. Another page's bmp artwork is 3.8 megs, the jpg for that page is 122k.

    diamond

    Julian,

    I have some artwork that I display in the document using PaintWatermark event handler, a different one for each page. The files containing each page's artwork are quite large - several megs each.

    When the merged document, watermarks and all, is exported to a PDF, the size of the export gets huge, especially if there are lots of employees in a company, and therefore lots of separate merged "Benefit Statements" in the export.

    Is there a way I can have, in effect, links to the watermark images, rather than the actual images themselves, in the exported PDF? This way I could supply the brochure artwork along with the PDF, allowing the PDF to pick up on the links, so the images would exist only once, outside of the document - not unlike what happens with linked images rather than embedded inserted images?

    Regards,
    diamond