Announcement

Collapse
No announcement yet.

Ddoc Preview Problem??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ddoc Preview Problem??

    I am trying to work with Don's dDoc application for print/previewing and am having a little problem and was hoping someone might know how to correct it??

    When I call the "dpEndDoc hDoc, %DDOC_END_VIEW + %DDOC_END_DELETE" stuff to display the preview window this is what happens:

    1) I get a brief glimps of the correct preview
    2) It then displays a blank preview window

    If I want to see my text I have to place the mouse pointer on the preview window area and click it. Then I can see my text.

    Anyone have any thoughts on this one?
    Thank you and God bless,
    Noble D. Bell
    www.noblesoftware.com

  • #2
    I don't know the solution, but "blank preview screen" is an intermittent problem I've had with the preview, too. I don't recall ever getting it immediately on launch like this, but I do get it from time to time when I change applications from the preview and then change back to the preview... the screen does not refresh.

    Were I to go hunting for the actual problem, I'd check out the window procedure for the preview screen, looking at the handling of WM_PAINT or maybe WM_NCPAINT. The paint might be getting short circuited by some application condition... controlled by one of the numerous GLOBAL variables.
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Hmm. That is possible. I will take a look at that after I get my software out the door. (I am almost a year overdue on the update.) Can anyone suggest a good print/preview control?
      Thank you and God bless,
      Noble D. Bell
      www.noblesoftware.com

      Comment


      • #4
        >Can anyone suggest a good print/preview control?

        I have not personally used it, but others have and reported good success with it here ... See the GRAPHICS commands in Pb/Win 8+ help as well as XPRINT in Pb/Win 7+.

        Matter if fact, unless I am mistaken someone (Borje Hagsten?) wrote a print and preview application using these tools and it's here "somewhere."

        MCM
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          RTF Option

          I have had pretty good luck with RTF formats. RTF itself is a bit strange but if you get the hang of it you can preview then print.

          I have written a viewer in FireFly and it works pretty well.

          Just write the report to disk and the point the viewer to the file.

          This allows the output to be loaded by some other programs also. This could be a "Feature" or a "Problem" but you can decide.
          Mark Strickland, CISSP, CEH
          SimplyBASICsecurity.com

          Comment


          • #6
            > have had pretty good luck with RTF formats.

            I think some folks here use HTML, since there are all kinds of HTML-format renderers around. Of course, writing all those <HEAD> and "<FONT>" and other 'control tags' for either RTF or HTML sure looks like a genuine PITA.

            MCM
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              Originally posted by Noble D. Bell View Post
              If I want to see my text I have to place the mouse pointer on the preview window area and click it. Then I can see my text.
              Have you tried tinkering with different ZOOM options in the StartDoc call?

              And while we're talking about DDOC, I've had trouble with it crashing when I print to some PostScript printers, mostly when using lots of dpWrapText calls. Has anyone else had that problem, and found a fix?
              Real programmers use a magnetized needle and a steady hand

              Comment


              • #8
                I've had trouble with partial repaints in the dDoc preview, still do actually. I did bring this up with Don a few years ago but he was unable to reproduce it. He suspected the video driver but that's as far as it went.
                Mark Newman

                Comment


                • #9
                  And while we're talking about DDOC, I've had trouble with it crashing when I print to some PostScript printers, mostly when using lots of dpWrapText calls.
                  I use dpWrapText a lot in The Provider Payment Partner System but have never had a problem with it.

                  Show relevant code after explaining 'crash.'
                  Michael Mattias
                  Tal Systems (retired)
                  Port Washington WI USA
                  [email protected]
                  http://www.talsystems.com

                  Comment


                  • #10
                    Originally posted by Michael Mattias View Post
                    Show relevant code after explaining 'crash.'
                    "crash" in this case means the I close the report with %DDOC_END_VIEW + %DDOC_END_DELETE. The resulting preview always works as expected. If I print to a PCL based laser printer, the report will always print. However, sometimes when I print to a PostScript printer, a few pages will go, then comes the infamous "We're sorry, but ddoc32.exe has experienced a problem and had to close". It doesn't happen every time, but it only happens on PostScript printers. I've tinkered with spool settings, network print queue vs. direct LPR printing, etc.

                    Here is a representative sample of the code:

                    Code:
                        DPFONT hPrt, %DDOC_FONTNORMAL, 9, %BLACK, "Courier New"
                        DPTEXT hPrt, c(1), cy, %DDOC_LEFT, FORMAT$(JobNumber)
                        DPTEXT hPrt, c(2), cy, %DDOC_LEFT, (PartNumber & " " & ShortPartDesc)
                        DPTEXT hPrt, c(4), cy, %DDOC_LEFT, (ColorDescription)
                        DPTEXT hPrt, c(6), cy, %DDOC_RIGHT, FORMAT$(Required)
                        DPTEXT hPrt, c(7), cy, %DDOC_RIGHT, FORMAT$(Produced)
                        cy = cy + lh
                    
                        IF LEN(JobNotes) > 0 THEN
                          DPTEXT hPrt, c(2), cy, %DDOC_LEFT, "Notes:"
                          DPWRAPTEXT hPrt, c(3), cy, (pw-0.75), (pl-1.50), lh, (JobNotes)
                          tLong1 = DPWRAPCOUNT(hPrt)
                          IF tLong1 < 1 THEN tLong1 = 1
                          cy = cy + (lh * tLong1)
                        END IF
                    My first reaction was this this is a driver issue. I haven't total rejected that idea, but the problem has occurred on at least 3 different manufacturer's of printer. In addition, a report that fails one day may work the next (same format, different content). These reports are generally greater than 20 pages.

                    I know some folks here have tinkered with the DDOC source; I was just curious if anyone else has seen this issue and found a solution or work around.
                    Real programmers use a magnetized needle and a steady hand

                    Comment


                    • #11
                      IF the problem occurs when printing to one printer but not when printing to another, I think I'd look at drivers, just as you did.

                      FWIW, ddoc does not care if the printer is postscript or PCL when sending to a printer... which is the whole idea behind Windows' printing.
                      Michael Mattias
                      Tal Systems (retired)
                      Port Washington WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment


                      • #12
                        Originally posted by Michael Mattias View Post
                        IF the problem occurs when printing to one printer but not when printing to another, I think I'd look at drivers, just as you did.

                        FWIW, ddoc does not care if the printer is postscript or PCL when sending to a printer... which is the whole idea behind Windows' printing.
                        I agree that because the printers are under Windoze control, it shouldn't matter. Except that DDOC is the only program that exhibits this behavior. Everything else we use (Word, Excel, OpenOffice, Mozilla, Thunderbird, QPulse, etc) never have any trouble printing.

                        We've learned to live with it, but it's annoying.
                        Real programmers use a magnetized needle and a steady hand

                        Comment

                        Working...
                        X