I need a script either in java applet or in any language for PHP to print silent printing the given URL in HTML to given Printer name with given no of copies. e.g http://myserver.com/printThis.php?url=http://anyserver/invoice/Invoice.html&printer=Dell©=2
If i run this URL in browser then it should print the given HTML (invoice) url to given Printer without showing Print Dialogue box
I need such script for HTML url not PDF url
I have created a java applet for this , it runs fine from CMD using appletviewer but it can not run from Browser, giving error : Error occurred while trying to Read: java.security.AccessControlException: access denied (java.net.SocketPermission www.oracle.com:80 connect,resolve)
If I need to signed or given somewhere permission then please let me know code or path details
Please help what was wrong
I have got jZebra ( http://code.google.com/p/jzebra/ ) for this but printing is not working to any printer , its allows to save pdf only for PDFCamp Printer but it also print blank to page :(
Has anybody successfully make working with jZebra ?
See Signing and Verifying JAR Files in the tutorial.
Related
This question is being asked as part of the CKEditor forum apparently now hosted on stackoverflow. I am treating this entry as a forum question. I hope it will appear in the correct place on the stackoverflow site. Please advise if it should be redirected.
I am using the filebrowserImageUploadUrl config setting in a ckeditor instance.
In Firefox or Chrome, when I click on the "Upload" tab to view images on the local device, select one, and click "Send it to Server," the value transferred to the server by ckeditor is simply the file name and extension. The url saved and returned is correct, and all works fine.
In IE11 (and earlier?) and the new MS Edge, the filename sent to the server is the full path name stripped of all "\" separators. So, for example, the file on a Windows PC named "C:\Users\username\Pictures\imagename.jpg" is sent as "C:UsersusernamePicturesimagename.jpg".
I verified this by simply returning the string "upload.FileName" in the ckeditor dialog callback, where "upload" is the first parameter in the transmitted transaction and is declared on the server in C# as a HttpPostedFileWrapper. The returned value in Firefox and Chrome are the filename.ext, while in IE and Edge, it was the stripped full path name described above.
Any ideas on why this might be the case? Is there a known process/protocol for detecting this difference and dealing with it?
I forgot to mention that I am using ckeditor 4.5.3 (latest as of this writing). The problem also occurs in release of 4.5.1 (earlier development).
The file name parameter sent to the server by ckeditor's upload (using various browsers for an MVC 5 website in Visual Studio 2015) turns out to be (1) only the filename.ext in Firefox, but (2) the full and correct file name in IE, including the "\" path separators.
So this is not a ckeditor issue. It is instead a choice in browser security settings and/or defaults. I am not sure what the IE default is (full path in my IE is disabled when I launch it directly, but is enabled when IE is used as the browser launched in Visual Studio). So, obviously, the file name has to be parsed out of the path on the server side if and when the full path is provided.
Here are the two operative lines of C# MVC code that solved the problem (surrounded by some write's). The controller does not assume what's coming. If only the filename.ext is transmitted, that's what ends up as the ImageName. If the full path, it parses it down to the filename.ext.
public ActionResult ControllerName(HttpPostedFileWrapper upload, string CKEditor, string CKEditorFuncNum, string langCode)
{
. . .
System.Diagnostics.Debug.WriteLine(upload.FileName);
string ImageName = upload.FileName;
System.Diagnostics.Debug.WriteLine(ImageName);
ImageName = System.IO.Path.GetFileName(ImageName);
System.Diagnostics.Debug.WriteLine(ImageName);
. . .
}
Using the writeline code, I was able to confirm the received value (either filename only or full path) and that the parse worked when needed but did not change the value when only the filename.ext was transmitted.
I hope this learning will be useful to others. Sorry for the false alert.
I am currently trying to figure out an issue with an Application Protocol Handler I've created. Following the directions listed on MSDN (http://msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx), I was able to register my application, PDF Annotator, to open via a URL. The issue I am experiencing is when I try to pass a parameter along with the call. The application will open, but the file parameter that gets passed is not opening within the application.
My registry key is verbatim as dictated by MSDN. My HTML code is as follows:
PDFAnnotator:C:\path\to\file\file.pdf
The way I understood the protocol handler is it takes the URL and tries to launch it via the command line. That being said, I am able to open my pdf file in PDFAnnotator with following command in the prompt:
PDFAnnotator.exe C:\path\to\file\file.pdf
I've tried formatting the file path in the HTML differently thinking that would be the issue too. Has anyone else come across this issue or something similar?
Obligatory Update for future generations (http://xkcd.com/979/):
The reason I was doing this is because half of the PDFs my application handled would be editable while the other half were read-only. I was trying to keep the read-only ones in browser with the Acrobat plugin (I'm targeting chrome only) while the protocol would allow me to set the links of the editable ones to open with Annotator. I tried, on whim, to reverse this (setting the default to Annotator and creating a protocol for Acrobat). I did this, first by trying Acrobat's URI Scheme (acrobat://), which didn't work outside of opening Acrobat. Then, I tried creating a protocol for Acrobat. When that fired off, it gave me an error stating the path was wrong for the file name, path name, or volume. So, progress? I'm giving up on this for now as other priorities have come up, but hopefully this helps somebody down the road.
I am trying to open a specific page within a .chm file from a Matlab GUI with the web function. Following the instructions and comments found here I have got the url of the desired page (mk:#MSITStore:D:\POv9\Ayuda\ayuda.chm::/html/ayuda1.html). However, when I write the command I need at the prompt
web('mk:#MSITStore:D:\POv9\Ayuda\ayuda.chm::/html/ayuda1.html','-browser')
it does not work (nothing happens neither an error message). I also have tried the following:
web('D:\POv9\Ayuda\ayuda.chm::/html/ayuda1.html','-browser')
web('ayuda.chm::/html/ayuda1.html','-browser')
without success.
I would like to know what I am doing wrong.
If you're on windows this works:
!hh mk:#MSITStore:D:\POv9\Ayuda\ayuda.chm::/html/ayuda1.html
This opens the help file in the Microsoft Help Viewer at the specified page.
I am a complete beginner in Flash & Actionscript.
My pet project is this: To provide a www.imageshack.com like service where people could upload single images and later anyone can view it using the generated url.
So far I have gotten to upload an image using Flash and store it in a directory.
http://pixels.guygar.com/
You can check the uploaded image at:
http://pixels.guygar.com/warehouse/
The issue being, I was under the impression when the PHP file is called to store the image in the folder /warehouse the browser would automatically navigate to:
http://pixels.guygar.com/upload.php
Where I can process the image i.e. generate a unique file name and provide the user with a unique URL to later access the resource.
What is happening is the image gets uploaded by the PHP script but the browser page still stays the same page even when providing a new url in the PHP script.
So the question is how do I go about so that a new URL (image resource linked) is passed back to the flash so that onComplete is called I can navigate to image that was just loaded? Or other ways of doing such?
I welcome your perspectives on this issue and thank you for your guidance.
i would store all values that you need later on in a session on the server (don't forget to pass the sessionID to the upload-script via GET).
at the end of the PHP script you just return "ok" (or "ko" if sth went wrong) to flash and then (in the callback/listener) call/load a second PHP-script that's doing the rest ... and returns you an URL to a thumbnail or whatever you want to do.
hope this points you in the right direction ...
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html?filter_flash=cs5&filter_flashplayer=10.2&filter_air=2.6#event:uploadCompleteData
Shows how data can be returned to flash after an upload.
I've been using Delphi and the Adobe Acrobat 9 API. I'm simply opening a PDF and printing it, followed by closing it without saving anything.
I'm having an issue while opening some PDFs though. If the PDF is password protected the Open method displays Adobe's "Input password" prompt. My application is running in an automated fashion, and therefor cannot proceed beyond this password prompt until somebody clicks cancel.
I've been looking for something that will either notify me that the file is password protected prior to opening it, or a parameter or something that will skip password protected files. I need my program to assume it cannot open any passworded PDF.
How about detecting whether the PDF is secured first before trying to open it?
I had a similar issue where I needed to find out if printing was allowed before doing a print commnad on the PDF. The API does not complain and the print function returns success even though the PDF file does not allow for printing.
I wrote a solution a while back by writing an Adobe plug in. If it's not out-of-the box, you 'll need to write a plug in.