Op 22/03/2011 12:34, [email protected] schreef:
Hello all:
I have created a receipt as a *.pdf that I need to send to a special
printer (you have seen them attached to POS terminals at your favorite
coffee shop). I have sized the *.PDF to the correct size (3" x 6")
and can see it if I look at the *.pdf properties. However, the *.pdf
is printing out at 11", not 6". Is there a way to insert an
end-of-file marker through iText in order to indicate 6" rather than 11"?
Hmm... very strange question, revealing a lack of understanding of PDF.
There's an end-of-file marker %%EOF, but that indicates that a revision
of a file is ended. If there is more than one %%EOF marker, you either
have a Linearized PDF file, or a PDF that has been appended.
The size of a page is defined in the /MediaBox entry of the page
dictionary. If the properties show the correct size, than the /MediaBox
has been defined correctly.
However: if the PDF is printed differently, you should look at the
viewer or at the application that is printing the PDF:
- are you using the correct printer driver?
- is the printer able to print the format you requested?
- is there any scaling going on?
For instance: the #1 reason why measurements on paper aren't equal to
the measurements that were expected is that people forgot to set the
PrintScaling to NONE: writer.addViewerPreference(PdfName.PRINTSCALING,
PdfName.NONE);
In any case: if the properties are correct, the PDF file is not to
blame, nor its producer; look at the other soft- and hardware that is
involved (the viewer, the printing app, the printer driver, the printer).
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php