Summary: | There is no way to control many pdfwrite features in GhostPCL (eg AutoRotatePages) | ||
---|---|---|---|
Product: | GhostPCL | Reporter: | Snorri Bergmann <snorri> |
Component: | PDF Writer | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | marcos.woehrmann |
Priority: | P4 | ||
Version: | 9.05 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: |
A landscape PCL input file
The resulting PDF |
Description
Snorri Bergmann
2012-05-21 16:56:25 UTC
Created attachment 8611 [details]
The resulting PDF
The PCL file is *not* landscape. It specifically requests portrait media and then rotates the content by 90 degrees. This draws the landscape content on portrait media. Exactly as the PDF file shows. So, this is not a bug, the PDF file perfectly mimics what is sent in the PCL file. Presumably the printer for which this PCL was prepared does not have a landscape feed, hence the requirement to rotate landscape content so that it fits on portrait media. When using the PostScript interpreter there is a feature (AutoRotatePages) which can be activated and which will attempt to rotate pages so that the dominant text direction is left-to-right, top-to-bottom. Presumably Swiftview also has such a feature. However currently there is no way to activate this feature from the PCL interpreter as it requires the us of PostScript constructs. I am altering this to an enhancement request (as there is no bug) and changing the title to reflect the actual requirement. The pcl commands controlling paper size and orientation are these (appear at the beginning of the pcl stream): ^[&l1x1o26a0l2e7C The first command "1o" sets the orientation to landscape (according to our pcl manual). The next command "26a" sets the paper size to A4. Strictly speaking, this means that the A4 sized paper should be placed in landscape orientation in the printer. No commands were given to rotate the print direction. In reality, on a typical printer, the paper can't be physically positioned in the feeder in landscape. The physical printer works around this problem by taking the portrait oriented paper and rotating the print direction 90 degrees. This is entirely a decision made by the printer and I would assume that a "wide" printer that could handle paper positioned in landscape mode would print the document upright on the landscape paper. Ghostscript should be able to offer the requested paper size and orientation. The pcl stream requested A4 paper in landscape orientation, NOT "portrait media and then rotates the content by 90 degrees". (In reply to comment #3) > Ghostscript should be able to offer the requested paper size and orientation. > The pcl stream requested A4 paper in landscape orientation, NOT "portrait media > and > then rotates the content by 90 degrees". I'm not prepared to enter a debate on the action of PCL since I'm not a PCL expert. However GS when rendering produces output *exactly* the same as the PDF file. If you believe this to be incorrect you can alter the component from PDF writer to PDF interpreter and argue the interpretation of the reference manual (and real-world implementation) with someone who understands the language. As far as I'm concerned the pdfwrite output matches the rendered output and is therefore correct. The inability to auto-rotate the page and contents to follow the text direction is a missing feature which is present in the PostScript implementation. (In reply to comment #4) > As far as I'm concerned the pdfwrite output matches the rendered output and is > therefore correct. The inability to auto-rotate the page and contents to follow > the text direction is a missing feature which is present in the PostScript > implementation. OK. Is there a workaround, like creating a PostScript file first, and then convert the ps file to pdf (with gs)? (In reply to comment #5) > (In reply to comment #4) > > > As far as I'm concerned the pdfwrite output matches the rendered output and is > > therefore correct. The inability to auto-rotate the page and contents to follow > > the text direction is a missing feature which is present in the PostScript > > implementation. > > OK. Is there a workaround, like creating a PostScript file first, and then > convert the ps file to pdf (with gs)? Not with GhostPCL because it does not interpret PostScript. A workaround: First, generate a postscript file from the pcl and pipe the output to ghostscript to generate the pdf. Something like: cat file.pcl | pcl6-905-linux_x86_64 -dNOPAUSE -dBATCH -sDEVICE=ps2write -sOutputFile=- -|./gs-905-linux_x86_64 -dNOPAUSE -dBATCH -dAutoRotatePages=/All -sDEVICE=pdfwrite -sOutputFile=file.pdf - *** Bug 693065 has been marked as a duplicate of this bug. *** |