Hi!
I need to print a url from Navision without loading the actual page in a browser. I prefer printing a webpage directly using the shell command.
Do you know how I should do this or what program (tool) I need to get to be able to do this?
Hope you can help!
What I’ve done so far:
Searched half the web, so still the other half to check.
Created a script that downloads the webpage to a (temp) file and then sends this file to the printer. But when saving the page the link to the images (2 pictures) gets lost. The url is referring to a local path instead of the internet path. Pictures aren’t printed.
"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."
0
Comments
Can I use this to load and print HTML? Maybe stream is to a Print Object?
Enyone?
If it was hard to write, it should be hard to understand."
In the Addon Matriks there is a print button that auto print external files. Maybe urls work too.?
2.
An other option would be to use a main page with an iframe to your url. With javascript you can request the printerselection page.
Maybe an example explains: Click in this page http://www.dvision.nl/home/iteminfo.asp?ID=905 on the small print icon and wait for the printer selection.
3.
And the vbscript sendkeys 'ctrl-p' in the ie browser does work.
The problem is that I need to print about 300 web pages every time I print a Navision invoice.
Yes, I know… I know!! But still, this needs to be done… even if we all think this is insane.
Loading the page, converting is to PDF, saving it and printing this PDF could be a bit of a slow process. I’m searching for that simple and quick solution. Something like, just printing web pages without having them to load, save to disk and convert them first.
If it was hard to write, it should be hard to understand."
You know it’s true! Ask any salesperson!
If it was hard to write, it should be hard to understand."
Can your script save the page in .mht (Web page archive) format? Then everything is included in one single file, pics too...
MCP, Dynamics NAV - Application
the sleep is important...
Can't save in .mht. But this could still be helpfull. I'll do some Googling.
@ ajhvdb
Without having tried myself or searched the net... How do you convert this: "objIE = CreateObject("InternetExplorer.Application")" to Navison? What automation control you need to do this?
If it was hard to write, it should be hard to understand."
but you don't need to script it in NAV
see: http://www.mibuso.com/forum/viewtopic.p ... estatement
look for the post from "azwierzchowski" where he uses the .executestatement
You'd have to write a component (dll) that is exposed to COM. There are discussions on these boards on how to do this.
Then, you'd have to call that dll from NAV, pass in the URL, and tell it what printer to print to.
Here's a link to an example of how you could make this work on MSDN.
http://msdn2.microsoft.com/en-us/librar ... eted(vs.80).aspx
The thing is that it’s actually not my problem to solve. The problem is in another application and it’s really not my job to fix this problem in Navision.
Although this is a nice challenge, I decided to stop spending my time and my customer’s money on it.
I fixed the problem by installing the Opera browser. Opera hasn’t any trouble opening 200 tabs. This way the customer only has to push the print button 200 times. :shock:
The customer is fine with this solution. This seems to be cheaper then developing a solution.
Again, thanks for the help!
If it was hard to write, it should be hard to understand."