Issue 47407 - XPagePrintable ignores print options
Summary: XPagePrintable ignores print options
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Linux, all
: P3 Trivial
Target Milestone: ---
Assignee: stephan.wunderlich
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-13 23:18 UTC by harshthebarsh
Modified: 2013-02-24 21:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description harshthebarsh 2005-04-13 23:18:17 UTC
printing a text document through XPagePrintable ignores the FileName property
and prints directly to the printer instead. Doing the same with XPrintable works
correctly (writes to a file). 
Example snipplet:

PropertyValue[] printOpts = new PropertyValue[1];
printOpts[0] = new PropertyValue();
printOpts[0].Name = "FileName";
printOpts[0].Value = "/tmp/out.ps";

xPrintable.setPrinter(new PropertyValue[0]);

XPagePrintable xPagePrintable =
(XPagePrintable)UnoRuntime.queryInterface(XPagePrintable.class, xPrintable);

//  this works (prints to /tmp/out.ps)
xPrintable.print(printOpts);
    
// this doesn't (prints to printer)
xPagePrintable.printPages(printOpts);
Comment 1 stephan.wunderlich 2005-04-14 09:23:17 UTC
the value for the FileName has to be a FileURL ... changing the script to 

PropertyValue[] printOpts = new PropertyValue[1];
printOpts[0] = new PropertyValue();
printOpts[0].Name = "FileName";
printOpts[0].Value = "file:///tmp/out.ps";

should do the trick.

Generally all UNO calls that expect filenames have to work with fileurls ... if
one still works with system pathes this is historically grown ;-)
Comment 2 stephan.wunderlich 2005-05-24 12:41:25 UTC
closing