473,412 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

XSL-FO -> PCL dynamically selecting printer paper bins / drawers / trays

Hello,

We have a 'standard letters' type app that can produce the letter as
an XSL-FO document. We have used FOP to produce PDFs and are quite
impressed. We also need to be able to print the letter and also choose
paper from different printer bins. This is mostly so that headed paper
can be used for the first page and continuation for the rest.

Does anyone know if it is possible to define this with XSL-FO and if
FOP, RenderX or anything else can actually make it happen.

Thanks vary much.
Mark Wheadon.
Jul 20 '05 #1
3 4846
Hi,

Mark Wheadon wrote:
We have a 'standard letters' type app that can produce the letter as
an XSL-FO document. We have used FOP to produce PDFs and are quite
impressed. We also need to be able to print the letter and also choose
paper from different printer bins. This is mostly so that headed paper
can be used for the first page and continuation for the rest.

Does anyone know if it is possible to define this with XSL-FO and if
FOP, RenderX or anything else can actually make it happen.


RenderX XEP can ascribe arbitrary PostScript page device settings
to individual page masters: this gives a chance to switch trays, trigger
manual feed etc. This feature only works for PostScript output:
PDF format does not let you store printer-specific instructions in the
document.

Regards,
Nikolai Grigoriev
RenderX
Jul 20 '05 #2
"Nikolai Grigoriev" <gr**@iitp.ru> wrote in message news:<bn***********@av771.comtv.ru>...
Hi,

Mark Wheadon wrote:
We have a 'standard letters' type app that can produce the letter as
an XSL-FO document. We have used FOP to produce PDFs and are quite
impressed. We also need to be able to print the letter and also choose
paper from different printer bins. This is mostly so that headed paper
can be used for the first page and continuation for the rest.

Does anyone know if it is possible to define this with XSL-FO and if
FOP, RenderX or anything else can actually make it happen.


RenderX XEP can ascribe arbitrary PostScript page device settings
to individual page masters: this gives a chance to switch trays, trigger
manual feed etc. This feature only works for PostScript output:
PDF format does not let you store printer-specific instructions in the
document.

Regards,
Nikolai Grigoriev
RenderX


Thanks Nik, is there any chance that you could give me a quick
example. I downloaded the XEP trial (I know it doesn't do PS) and have
had a look through the documentation briefly but can't see how I might
do what you suggest.

Thanks again. MAW.
Jul 20 '05 #3
Hi Mark,

"Mark Wheadon" <ma***@pacsoluk.com> wrote:
Thanks Nik, is there any chance that you could give me a quick
example. I downloaded the XEP trial (I know it doesn't do PS) and have
had a look through the documentation briefly but can't see how I might
do what you suggest.


Here's the relative specs:

http://xep.xattic.com/xep/doc/spec.html#Page_Device
http://xep.xattic.com/xep/doc/spec.pdf#Page_Device

Essentially, we have a very general processing instruction
that inserts arbitrary PostScript code as a value for an
entry in page device dictionary. This value my be set
for the whole document (in which case the PI should
be located at top level, before <fo:root>), or for an
individual page (in this case, the PI is placed inside
<fo:simple-page-master> for that page). Some examples:

<?xep-postscript-page-device /Duplex true?>
<fo:root xmlns:fo=....>
....

sets duplex mode for the document (and reverts back to the
original mode in the document trailer);

<fo:simple-page-master master-name="first-page">
<?xep-postscript-page-device /MediaColor (yellow)?>
<?xep-postscript-page-device /MediaType (coversheet)?>
<fo:region-body margin="1.5in 1in"/>
....
sets /MediaColor and /MediaType entries for padedevice
for pages _produced with this page-master_ (and reverts
them back to original values in the page trailer);

<?xep-postscript-page-device
/InputAttributes
<< 0 << /PageSize [612 1008] >>
1 << /PageSize [612 792]
/MediaType (letterhead)
/MatchAll true

?>

specifies a whole /InputAttributes dictionary to tweak media selection
policies for the document.

A necessary admonition: the mechanism is extremely powerful
but requires care to use. Incorrect PostScript code in the PI may
ruin the whole output file. Allowed entries for setpagedevice
and currentpagedevice are printer-specific; please consult your
printer manual for a list of page device options and their values.
Please also note that the resulting code may not be portable
across printers.

Regards,
Nikolai Grigoriev
RenderX
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: anthony | last post by:
hello , is there any simple way to override control panel>printer and fax>printer paper size setting by c# or vb.net?I tried the Printing.PrinterSettings class , however it seems use for setting my...
0
by: Bill Hymel | last post by:
Access Printing - Just wondering if you have a solution for this problem - I need to be able to print an Invoice with the 'terms and conditions' on the back side of an Invoice. To do this, I...
1
by: Bruce Wood | last post by:
I'm having a devil of a time calling DeviceCapabilities() in order to get the list of paper names / codes / sizes for a printer. Here is my code and the input it produces: static extern Int32...
0
by: bafidi | last post by:
please hel i cant change the default printer papersiz can you show me an example for a4 paper siz and custom paper siz
0
by: Just Me | last post by:
I want to save and then be able to restore the printer paper size. Something like: WriteLine(lFileNum, gAddressesPD.DefaultPageSettings.PaperSize.ToString) Then:
1
by: Claudio | last post by:
how do I get the paper height and width of the default printer?
0
by: Academic | last post by:
I posted this in the vb group but it is a pretty esoteric question and I did not get a reply. I'm hoping someone here has some experience generating custom printer forms. If I generate a new...
23
by: Al Grant | last post by:
I have a 'printable' button to generate printable output and want this to use A3 if available, irrespective of the user's default printer setting. Is there any way to set a page's preferred...
1
by: =?Utf-8?B?bW9vc2VzY29vdGVy?= | last post by:
My Lexmark Z53 color jetprinter is connected to xp. When I try to print, the paper goes through but nothing prints. I would appreciate help. -- moosescooter
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.