Printing a webpage (url) directly from Navision
eromein
Member Posts: 589
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:
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."
If it was hard to write, it should be hard to understand."
0
Comments
-
Anybody have experience with Microsoft HTML Object Library?
Can I use this to load and print HTML? Maybe stream is to a Print Object?
Enyone?"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
1.
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.0 -
Maybe you can create a pdf-file from your script and print this pdf-file to the printer? This way, pictures are embedded in the file.eromein wrote: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.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Thanks Luc, I thought about that.
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."Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
Seems impossible to me ;-)eromein wrote:[...] just printing web pages without having them to load, [...]No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
What about “Everything is possible with Navision”?
You know it’s true! Ask any salesperson!"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
Just a silly idea...
Can your script save the page in .mht (Web page archive) format? Then everything is included in one single file, pics too...Modris Ivans
MCP, Dynamics NAV - Application0 -
This works but you need to convert it to NAV
Set objIE = CreateObject("InternetExplorer.Application") objIE.Navigate("http://www.google.com") While objIE.Busy Wend objIE.ExecWB 6,2 WScript.Sleep(3000) objIE.Quit Set objIEA = Nothing
the sleep is important...0 -
@ modric
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?"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
'Microsoft Internet Controls'.InternetExplorer
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 .executestatement0 -
If you know VB.Net or C#.Net, you can use the .Net framework, v2.0, to do this.
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).aspx0 -
Thank you all!
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!"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
