Announcement

Collapse
No announcement yet.

Xprint silently print pdf

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

  • Doug Hitchens
    replied
    Just to throw another name out, PrimoPDF is what I use. It installs as a printer, and it is free.

    http://www.primopdf.com/

    Leave a comment:


  • Frank W. Kelley
    replied
    Previously I used ddoc for printing but recently started switching all my apps over to PDF using libharu. The speed is impressive (nearly instantaneous on even complex, multi-page documents). The libharu learning curve is steep due to the less-than-ideal documentation, but well worth the effort.

    Leave a comment:


  • Hubert Brandel
    replied
    If you only want to create text PDF, there is sourcecode here for that.
    If you want to create own PDF, or change / manipulate existing ones,
    than I recomend debenu quick pdf - for easy tasks you can use the free one (not printing) but If you need more the cost of the dll is less than Acrobat and is well supported (pur DLL or activeX).

    Leave a comment:


  • Michael Mattias
    replied
    the easy way to do 'background anything' is to run it in its own thread of execution.

    Mr. Weissberg's code can easily be ported to do same.

    Leave a comment:


  • BOB MECHLER
    replied
    I'm just revisiting the fast generation of PDF docs and found this thread from last year. There are some extremely good comments.

    I'm leaning toward using Roger Weissberg's approach as my first choice since we have all of our customers installing PDFCreator already

    Bob

    Leave a comment:


  • Roger Weissberg
    replied
    Create a pdf

    I do following in my invoice-program:

    Code:
    'save documentinfos in registry for transfering to pdf-creator
    RegDataSet(%HKEY_CURRENT_USER, "SOFTWARE\PdfCreator\Program", "AutosaveDirectory", PdfDir$, %REG_SZ)
    RegDataSet(%HKEY_CURRENT_USER, "SOFTWARE\PdfCreator\Program", "AutosaveFilename", PdfFile$, %REG_SZ)
    RegDataSet(%HKEY_CURRENT_USER, "SOFTWARE\PdfCreator\Program", "UpdateInterval", "0", %REG_SZ)
    RegDataSet(%HKEY_CURRENT_USER, "SOFTWARE\PdfCreator\Program", "OpenOutputFile", "0", %REG_SZ)
    RegDataSet(%HKEY_CURRENT_USER, "SOFTWARE\PdfCreator\Program", "UseAutoSave", "1", %REG_SZ)
    RegDataSet(%HKEY_CURRENT_USER, "SOFTWARE\PdfCreator\Program", "UseAutoSaveDirectory", "1", %REG_SZ)   
    
    xprint attach "pdfcreator"
    
    'now follows your normal printing
    xprint
    xprint ....
    xprint close
    
    'the pdfFile will be silent created in pdfDir$
    
    'then I merge the pdfFile with then scanned invoice form with pdftk.exe (pdfToolKit)
    
    Tem$ = CHR$(34) + PdfPrg$ + CHR$(34) + " " + _
           CHR$(34) + PdfDir$ + "\" + PdfFile$ + CHR$(34) + " multibackground " + _
           CHR$(34) + PdfDir$ + "\invoice_form.pdf" + CHR$(34) + " output " + _
           CHR$(34) + PdfDir$ + "\" + NewPdfFile$ + CHR$(34)
    
    SHELL Tem$, 1, EXIT TO exitvar&
    I tried with Haru Free PDF Library. There I missed some methods for printing such as underline and some other.

    You can install pdfcreator as expert without any icon or shortcut, without pdfarchitect, without any toolbar and other unrequested programs. Then you have to integrate pdftoolkit and ready. It works. And both tools are free.
    Last edited by Roger Weissberg; 19 Jun 2013, 10:54 AM. Reason: Code Tag inserted

    Leave a comment:


  • Michael Mattias
    replied
    I suppose someone should mention, Acrobat has an API, too.

    AFAIK you need to license the full Acrobat product to get everything you need ; that is, the free viewer does not support API calls.

    But if you've already licensed (or were looking for an excuse to do so) the full Acrobat product...

    Leave a comment:


  • Michael Mattias
    replied
    I've been lobbying to use Haru but the boss needs convincing that [Haru PDD Library ] is used by other Powerbasic programmers.
    It's what I used in the application I mentioned in post #8 this thread.

    But it's not about the programmer, it's about the user. I can probably get the user from that thread to tell you he likes whatever I used. Drop me an email if you need that.

    [email protected]

    Leave a comment:


  • Paul Purvis
    replied
    Bob, If you are using the free cutepad and doing something
    like this to create your pdf by automating the cutepdf dialog.

    http://www.powerbasic.com/support/pb...1&postcount=13

    Try running that exe repeatedly, the dialog will soon hang. At least the similar code to that hangs on my machines.

    With that code, what if a user is already printing something else from another program or the same program in another instance using cutepdf.


    Cutepdf is nice, i have it on all my machines, but the free version for automation in programming is not for MCM's Susie Q or Susie Q's relatives working for us.

    Who knows when CutePDf makers are going to make a change. Haru has not really changed much in many years.

    Jose Roca's work to make Haru work with PB is very similar to the code of other Haru examples used.

    Plus if you use it, i would likely learn from your experience with Haru in the future.

    Leave a comment:


  • John Petty
    replied
    If I understand your original question correctly and you also wish to print a hard copy. If so then as it is a postscript file then after creation you simply get the file and send it to a postscript enabled printer.

    Leave a comment:


  • John Petty
    replied
    I have been using CutePDF for many years, in fact its my default printer. I do some complex formatting and its very fast and produces small files.
    My son prefers DoPDF.

    Leave a comment:


  • Iain Johnstone
    replied
    It may be a corruption of the French Le Roi, meaning The King.

    It was a popular name amongst the Afro-Caribbean children that I used to teach in South London - their history was one with French influence, so this may be the source.

    Iain Johnstone

    Leave a comment:


  • BOB MECHLER
    replied
    Thanks for the tip Jean-Pierre. I've followed Haru Free Library and did some tests.

    Michael is right about why the Ddoc through PDF Creator as the printer driver is slow. It's the bitmap per page thing, instead of a command language like Haru.

    I've been lobbying to use Haru but the boss needs convincing that it is used by other Powerbasic programmers.

    In the far distant past I used a program called JustText by William Bailey to create PostScript for the original $7000 Apple LaserWriter. It produced classified ads for newspapers.

    About 7 years ago I used the HP/GL2 variant of PCL to do some fancy checks, so I should be able to learn Haru. I'll check the link.

    Just curious, do you know the meaning or derivation of the name LEROY. It's my middle name. You know how some people prefer using their middle name instead of their first name. Well, for some reason kids used to rib me by calling me Leeee-Roy. Since it's French in origin, I can assume it isn't pronounced that way. Probably something like Le Roy with a short e. Sounds better to me than Leeee-Roy.

    Bob Mechler

    Leave a comment:


  • Jean-Pierre LEROY
    replied
    Dear PB users,

    Haru Free PDF Library could be a solution to generate directly a PDF file; I use it in my PB applications:

    More information on Jose forum:

    www.jose.it-berater.org/smfforum/index.php?topic=3058.0

    Leave a comment:


  • Michael Mattias
    replied
    I don't see how ddoc is used to create PDFs, unless your "PDF Creator" is treating each page as an "image" (which also makes the PDF files "HUGE")

    You might want to go to a true PDF library for your statement printing and create *.PDF files directly to disk.

    I did this for one client.. we generate 1500 invoices per day to PDF files in about five minutes. We do statements, too but I have no timing available. That's about 6,000 statements per month.

    You could contact my office if you want to talk about 'outsourcing' this.

    Leave a comment:


  • BOB MECHLER
    replied
    PDFCreator when combined with Ddoc as the output engine is too slow when printing a large number of documents. We are already doing that combination.

    The end result is to produce as rapidly as we can PDF's that will be archived for later retrieval via a web site. We are already doing this but sometimes 4 or 5 thousand statements take 12-15 hrs to generate.

    Bob

    Leave a comment:


  • Dave Biggs
    replied
    Bob.

    I don't know how you would go with licensing and so on but PDFCreator seems to have a lot of the features that you want already built-in.

    The PDFCreator print monitor / configuration program in the Start Menu Group has program settings that include.
    Auto-Save: Configure auto naming options and destination folder.

    Actions: To be performed Before and/or After Saving - especially useful? - Name a script/program to be run including program parameters, eg "<OutputFileName>", the name of the PDF just saved.
    Obviously you can use this feature to launch PB apps that could do just about anything with a newly created PDF

    Print: Print after saving. Optionally 'use default printer without user interaction' and hide progress during printing.

    Profiles: Different confgurations can be 'associated' with different named instances of the PDFCreator Driver. Profiles are exportable for use in different locations..

    Leave a comment:


  • Mel Bishop
    replied
    Originally posted by BOB MECHLER View Post
    Didn't know CutePDF had that option.
    Well, it's XPRINT ATTACH CHOOSE.

    Leave a comment:


  • BOB MECHLER
    replied
    Didn't know CutePDF had that option.
    No harm in trying the "print" option of ShellExecute.

    Thanks,

    Bob Mechler

    Leave a comment:


  • Michael Mattias
    replied
    Not sure it helps but you could try...

    ShellExecuteEx with a verb of "print." Maybe that "knows" the correct command to print a PDF file for the version of Acrobat currently installed.

    (I am guessing from your comments your PDF 'printer' creates a *.PDF file ???)

    Leave a comment:

Working...
X