Margins: Need more detail
Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1736
Printed Date: 13 May 25 at 2:01AM Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com
Topic: Margins: Need more detail
Posted By: RedOctober
Subject: Margins: Need more detail
Date Posted: 11 Feb 11 at 9:12PM
I am using QuickPDF Library 7.23 on Delphi 7, XP. I have a PDF file of a label that I need to print, programatically, without Adobe installed. The label size is 3 inch wide by 1 inch high, and I'm using a Zebra LP 2844 to print the label. I've created the label, with proper margins, in a different program specifically made for the purpose, and saved it as .Pdf. When I open the file in Adobe, and print it, it prints perfectly. However when I use QuickPDF, QuickPDF adds it's own margins (about 0.75 inch left and right, and about quarter inch top, zero bottom. Using Quick PDF with the large margins, there's little room left in the center for the text on the label, so it word wraps.
I have read your other post about margins, where you tell about http://www.quickpdflibrary.com/help/quickpdf/PageLayout.php and look at the SetPageDimensions and about layers and stuff. This does me no good. What are the parameter units in SetPageDimensions? Inches? Pixels? Points? Also, what functions, exactly, and how, should I use them to get rid of these unwanted margins?
Here is what I'm doing.. maybe you can tell me what I'm doing wrong:
Assume: ... qwk_pdf: TQuickPDF0723; pdf_fnm: String; ... qwk_pdf := TQuickPDF0723.Create; if not UnlockedOK(qwk_pdf) then ... pdf_fnm := 'C:\_temp\my.pdf'; ...
qwk_pdf.LoadFromFile(pdf_fnm); qwk_pdf.PrintDocument(Printer.Printers[Printer.PrinterIndex], 1, 1, qwk_pdf.PrintOptions(0, 0, 'My Label'));
(Result: Prints the label with a large three quarter inch left and right margin s and a one quarter inch top margin).
I know for a fact that the large left and right margins are not in the .Pdf file. When I made the file, I set the margins to zero, and in Adobe, the margins are as I had created them. QuickPDF is adding the margins on it's own.
Can you be more specific in your answer about margins, giving me a code snippet that includes the exact functions, with parameters that I need to to this? Thanks. My project is stuck until I get an answer.
|
Replies:
Posted By: Ingo
Date Posted: 11 Feb 11 at 9:18PM
Hi!
To your question "...What are the parameter units...": You can get PSUnits (or points), inches and millimeters. It's your choice: http://www.quickpdflibrary.com/help/quickpdf/SetMeasurementUnits.php
Cheers, Ingo
|
|