내 Ubuntu 16.04 LTS 시스템에는 Citizen CL-S621Z 라벨 프린터, 50x80mm 라벨 (세로) 및 인쇄하려는 50x80mm PDF가 있습니다.
문제는 CUPS가 작업을 270도 회전하여 옆으로 나옵니다.
입력 PDF 파일 자체에는 페이지 회전이 없습니다 pdfinfo
.
admin@bukittinggi ~> pdfinfo label.pdf
Creator: cairo 1.13.1 (http://cairographics.org)
Producer: cairo 1.13.1 (http://cairographics.org)
Tagged: no
UserProperties: no
Suspects: no
Form: none
JavaScript: no
Pages: 1
Encrypted: no
Page size: 141.732 x 226.772 pts
Page rot: 0
File size: 32443 bytes
Optimized: no
PDF version: 1.5
내 인쇄 명령 줄은 다음과 같습니다.
lpr label.pdf
나는 포함 자동 페이지 회전을 방지하기 위해 옵션을 시도했습니다 -o 'nopdfAutoRotate'
, -o portrait
, -o landscape
과 -o orientation-requested=N
(의 값을 N
, 이들 중 아무도 0 ~ 7) 어떤 영향을 미칠 것으로 보인다.
The job seems to pass through pdftopdf
and then pdftops
in the CUPS filter graph, and as far as I can tell, the rotation occurs when the job hits the latter filter, after which the page rotation is set to 270°:
~> /usr/sbin/cupsfilter -P test.ppd -m application/vnd.cups-postscript label.pdf > filtered.ps
~> ps2pdf filtered.ps
~> pdfinfo filtered.pdf
[...]
Page size: 142 x 227 pts
Page rot: 270
/usr/lib/cups/filter/pdftops
is from cups-filters-core-drivers
version 1.8.3-2ubuntu3
. Oddly, the problem does not occur on Raspbian, which has cups-filters-core-drivers
version 1.0.61-5+deb8u3
.
Update: I was able to get the desired orientation by carefully editing the PPD file to exactly match the label dimensions:
*DefaultPageSize: w142h227
*PageSize w142h227/1.97x3.15": "<</PageSize[142 227]/ImagingBBox null>>setpagedevice"
*PageRegion w142h227/1.97x3.15": "<</PageSize[142 227]/ImagingBBox null>>setpagedevice"
*ImageableArea w142h227/1.97x3.15": "0 0 142 227"
*PaperDimension w142h227/1.97x3.15": "142 227"
Thanks to Michael from the CUPS team.
Zebra의 PPD 파일을 사용하는 Zebra Z4MPLUS 프린터에서도 동일한 문제가 발생했습니다. PPD 파일의 레이블 크기는 8.00x4.00 "이지만 우리에게는 적합하지 않았습니다. Custom 4x8in을 사용하는 것도 작동하지 않았습니다. PPD 파일에 4.00x8.00"레이블 크기를 만든 다음에서 선택해야했습니다. 컵. 이 작업은 PPD에서 필요하지 않은 4.00x13.00 "레이블 크기를 편집하여 수행했습니다. 다음은diff original.ppd edited.ppd
40c40
< *DefaultPageSize: Custom.4x8in
---
> *DefaultPageSize: w288h576
80c80
< *PageSize w288h936/4.00x13.00": "<</PageSize[288 936]/ImagingBBox null>>setpagedevice"
---
> *PageSize w288h576/4.00x8.00": "<</PageSize[288 576]/ImagingBBox null>>setpagedevice"
98c98
< *DefaultPageRegion: Custom.4x8in
---
> *DefaultPageRegion: w288h576
138c138
< *PageRegion w288h936/4.00x13.00": "<</PageSize[288 936]/ImagingBBox null>>setpagedevice"
---
> *PageRegion w288h576/4.00x8.00": "<</PageSize[288 576]/ImagingBBox null>>setpagedevice"
154c154
< *DefaultImageableArea: Custom.4x8in
---
> *DefaultImageableArea: w288h576
194c194
< *ImageableArea w288h936/4.00x13.00": "0.00 0.00 288.00 936.00"
---
> *ImageableArea w288h576/4.00x8.00": "0.00 0.00 288.00 576.00"
209c209
< *DefaultPaperDimension: Custom.4x8in
---
> *DefaultPaperDimension: w288h576
249c249
< *PaperDimension w288h936/4.00x13.00": "288.00 936.00"
---
> *PaperDimension w288h576/4.00x8.00": "288.00 576.00"
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다