Printing a document within author applet
Oxygen general issues.
-
- Posts: 45
- Joined: Wed May 23, 2012 11:20 am
Printing a document within author applet
Is there an API call I can use to issue a print operation? Similar to the print within the oxygen applications. Or do I need to implement my own using the java.awt.print?
Thanks
Thanks
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Printing a document within author applet
Hi Neil,
You can try this method:
AuthorComponentProvider.print(boolean preview)
This either prints to the printer or shows the print preview dialog.
Regards,
Radu
You can try this method:
AuthorComponentProvider.print(boolean preview)
This either prints to the printer or shows the print preview dialog.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 45
- Joined: Wed May 23, 2012 11:20 am
Re: Printing a document within author applet
I've now got a problem that the printed document is too big. I'm guessing that the CSS we use in the document display is being used to print. Is there any way to scale the printed documents down?
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Printing a document within author applet
Hi Neil,
Ideally I think that if you would be using in your CSS constructs like:
These "print" media sections would have to be ignore when the XML document is edited but taken into account when the document is printed (this is the way in which a web browser behaves).
Unfortunately Oxygen does not do this yet, I added an improvement request for this.
In the meantime, if you use the "Print Preview" action, the "Print Preview" dialog contains a combo box called "Printing Scale".
This scale is also used when the user prints directly.
You can bundle a set of preferences with an applet distribution so if in a standalone installation you set the printing scale and then export the global preferences to an XML file, this XML file could be used to provide a default set of options for the applet instead of the resources/options.zip.jar which comes with the sample project.
Regards,
Radu
Ideally I think that if you would be using in your CSS constructs like:
Code: Select all
@media print {
*{
font-size:10px;
}
}
Unfortunately Oxygen does not do this yet, I added an improvement request for this.
In the meantime, if you use the "Print Preview" action, the "Print Preview" dialog contains a combo box called "Printing Scale".
This scale is also used when the user prints directly.
You can bundle a set of preferences with an applet distribution so if in a standalone installation you set the printing scale and then export the global preferences to an XML file, this XML file could be used to provide a default set of options for the applet instead of the resources/options.zip.jar which comes with the sample project.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Printing a document within author applet
Hi Neil,
In Oxygen 15.0 which was just released the @media print at-rule should be properly supported when printing from the Author mode.
Regards,
Radu
In Oxygen 15.0 which was just released the @media print at-rule should be properly supported when printing from the Author mode.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service