Jump to content


Photo
- - - - -

Printing HTML documents from ProIV


9 replies to this topic

#1 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 17 July 2000 - 08:12 PM

In our applications, we allow our end-users to create reports that include images. We have found the simplest way to do this to be creating HTML documents that point to the image source. However, the printing of HTML from ProIV is a bit convoluted. The report dynamically calls Netscape (or IE) and shows the document. The user then has to print it from the browser.

My question is this: Does anyone have a better solution for printing reports with imbedded graphics?

I have found no way to print HTML directly from ProIV. If one exists, this would be an ideal solution.
I have found no way to transparently use a browser to print a file to a specific destination printer (note: not necessarily the Windows default). If one exists, this would be a good solution as well.

Any help you can offer is greatly appreciated.

#2 Andry Cruz

Andry Cruz

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • Location:Santo Domingo, Dominican Republic

Posted 18 July 2000 - 05:53 AM

Oh well! what a dream of a PROIV programmer!
Yes, you can print an html document direct from PROIV.
Surfing around Ive found a command line tool (perfect for
PROIV)called SurfPrint (Windows only). The trial version can be downloaded
from http://www.surfstats...print/index.htm. It prints
as easy as #SYS = SYSTEM('surfprint file.html').

Im trying to program what I call a 'PROIV WEB SPOOLER' wich
will have the basic PROIV report components (GS,PS,
CTRL BRKs) using LUs. Id like to contact you directly,
please email me at cruzdiaz@tricom.net

If somebody knows a better way Id be glad to know.

Bye. AC

#3 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 18 July 2000 - 04:15 PM

Answering my own question...

I did find that the following works exceptionally well. Not only does it directly print the HTML without installing 3rd party software or scripting, but it asks for the Windows printer destination.

#STAT = SYSTEM('GUI WINDOWS rundll32.exe c:\winnt\system32\mshtml.dll,PrintHTML 'filename')

For some reason, I had to use c:winnt instead of %SystemRoot%. Ideally, I would like %SystemRoot% to work as I wouldn't have to create report destinations like Windows NT HTML, Windows 95 HTML, etc.

I found the exact synax for the command in the registry for HTML file properties. I also suppose that text files would have a similar command. If so, the ProIV application could circumvent printing via ProIV and go straight to the Windows print manager every time.

Joseph

#4 Guest_Will_*

Guest_Will_*
  • Guests

Posted 19 July 2000 - 10:40 AM

You might want to have a look at www.wadeveloper.com, where
you can get a free eval of a product that does this. You will
need PROIV 4.6 and a developer license to use it.

#5 David Tuke

David Tuke

    Member

  • Members
  • PipPip
  • 20 posts

Posted 20 July 2000 - 02:40 PM

You could try this:

once the proiv print job is encoded to a file of some sort, in a unix environment
you can use a utility (free) called mpack (search the internet for this). with this you can
mime encode the file as an attachment to an email, and the user can get an email with an attachment
they can open and view. if the attached file has an extension .txt, windows based browsers will start
notepad (or wordpad) to view the file.

another possibility if you have documents formatted for pcl printers - print thses to a file and use
another utility called pcl2pdf (free eval) - which converts a PCL file to acrobat PDF - and then email this as an attachment
users can then view (but not modify) the pdf document with the acrobat PDF viewer.

we have used this successfully with or extensively formatted pcl laser documents - this alos means that
the acrobat viewer handles the local printing and conversion to whatever local printer type is in use.
both mpack and pcl2pdf are available for different OS platforms, and can be driven
from a system command in proiv.

I would like to know if anyone has ideas on a PCL code graph producer - one we could drive from proiv
to produce embedded graphs in our HP PCL reports (for treating as above)

david tuke

#6 Guest_Jacky_*

Guest_Jacky_*
  • Guests

Posted 24 July 2000 - 03:10 AM

Oh well! what a dream of a PROIV programmer!
Yes, you can print an html document direct from PROIV.
Surfing around Ive found a command line tool (perfect for
PROIV)called SurfPrint (Windows only). The trial version can be downloaded
from http://www.surfstats...print/index.htm. It prints
as easy as #SYS = SYSTEM('surfprint file.html').

Im trying to program what I call a 'PROIV WEB SPOOLER' wich
will have the basic PROIV report components (GS,PS,
CTRL BRKs) using LUs. Id like to contact you directly,
please email me at
cruzdiaz@tricom.net.

If somebody knows a better way Id be glad to know.

Bye.

#7 Peter Davies

Peter Davies

    Advanced

  • Members
  • PipPipPip
  • 96 posts
  • Gender:Male
  • Location:Bangkok, Thailand

Posted 27 July 2000 - 07:16 AM

Well here it is....

Try the following URL from IE5.0 or
above (meaning 5.5 which has a print preview).

http://www.proiv.co....nux&INVOICE_NO=

The URL Opens an HTML file, the HTML contains 2 things. A reference to an
XSL stylesheet and a call to a PROIV report that generates
XML.

All of the formatting is in the XSL which is basically a
well formed HTML document with some XSL stylesheet commands
embedded.

If you do a view source, you can only see the generated XML
good for PR - you can say that your data is XML'd already.

The XML and XSL are combined on the browser with IE5.

If you print the HTML, you'll also see that you get one
invoice per page.

Trade secret that one - try learning CSS !!

I'm not sure if Netscape does this but you can have a Java
object running on the server that combines them on that side.

Happy hunting.

Peter

#8 Bryan Thompson

Bryan Thompson

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Harrisburg, Pennsylvania

Posted 04 October 2000 - 04:05 PM

I've been trying on and off for about a week now to try
and get an html page to print from pro-iv. I've tried the
third party producs that everyone has listed here to print
from the command line and none of them seem to print
my html correctly. the main problem with them being that
they don't recognise the style page breaks so I get multiple
pages on one page. using mshtml.dll seems to be the way to
go except for the fact that i'm printing anywhere from 1
to 100 html files at a time and 100 printer properties boxes
can become quite anoying. Working with the dll's is a bit
over my head I don't do any visual basic programing or work
with the dll's if I can help it however I've been poking around
the registry and the file associations in widows and found that
there are refrences to using mshtml.dll with more than 1
parameter. Could this be a way to print directly to the printer
without the printer dialog comming up. I found this under
explorer - file type - internet shortcut - printto theres
a refrence in there that reads.
rundll32 c:\windows\system\mshtml.dll,PrintHTML '%1' '%2' '%3' '%4'
if anyone has any information on this it would be greatly
apreciated. I've searched the web for everything I can think
of and turned up empty

Bryan Thompson

#9 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 04 October 2000 - 04:34 PM

Bryan,

I tried hacking those four parameters for about a week and didn't get anywhere. I think that the only way to get that answer is to speak with a Microsoft Windows developer. I did not have that level of access...

Best of luck,

Joseph

#10 Bryan Thompson

Bryan Thompson

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Harrisburg, Pennsylvania

Posted 04 October 2000 - 04:40 PM

Working in seattle for the last 6 months I know a few
microsoft developers i've just sent out a few e-mails
to see if theres anything possibly in the microsoft internal
knowledge base or if anyone can quickly answer that..
hopefully i'll get a reply soon.

Bryan



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users