Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / Other products and questions / How do I set Page Size with PDFCreatorPilot3?
Author Message
Kjeld
Member
# Posted: 19 Mar 2007 20:03


It appears the default is 8.26 x 11.68. I need 8.5 x 11.0, but I don't see it. Is there an object model for PDFCreatorPilot3? I already coded my application with it and was waiting for final sign off before purchasing a licensed version. If I can get this sized correctly, I will buy it. Thanks

Stanislav
Member
# Posted: 20 Mar 2007 03:08


Hello,

This is not a problem. First of all, you can use TxPDFPageSize in function PDFPAGE_Size. I can't remember which is 8.5 x 11.0, maybe psLetter. Another solution is to use PageHeight and PageWidth, it is measured in pixels, defalt PDF page resolution is 72 dpi, so for 8.5 x 11.0 width should be 8.5*72=612, height 11*72=792:
PDF.PageWidth = 612
PDF.PageHeight = 792

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Kjeld
Member
# Posted: 20 Mar 2007 13:40


I am sorry, I am not following this. Is this the command I need to set the page size to 8.5x11.0?

PDF.PDFPAGE_Size ps8x11

I have your tool working perfectly in my application, I just can't get the page size to 8.5x11.0. Actually, shouldn't that be the default anyway?

Thanks
-kjeld

Stanislav
Member
# Posted: 20 Mar 2007 13:49 · Edited by: Stanislav


Hello,

You can use it like this:
PDF.PDFPAGE_Size = 7

or, using mentioned functions:

PDF.PageWidth = 612
PDF.PageHeight = 792

The default size for PDF page is 8.26x11.69

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

Kjeld
Member
# Posted: 20 Mar 2007 15:48


Thanks, it worked. So why is the default 8.26x11.69? I have never heard of that paper size.

I am ready to purchase. I will need a receipt since I need to submit the cost from reimbursement. Can I get one during your purchase process?

Stanislav
Member
# Posted: 21 Mar 2007 03:11


Hello,

This is A4 paper size.

All purchase methods are described on our support page
http://www.colorpilot.com/support.php
under Orders-How to order our products

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

klakkad
# Posted: 6 Jul 2007 22:49


I am using Demo version. Using HTML add on to convert HTML to PDF. I would like to have page size "legal" and it's not working. Please help asap.
Here is code I am using.

//' create pdf library object
PDFCreatorPilot3Lib.PDFDocument3Class objPdf = new PDFCreatorPilot3Lib.PDFDocument3Class();
//' initialize PDF Engine
objPdf.StartEngine("demo@demo", "demo");
//' set AutoLaunch flag to TRUE to automatically open the generated pdf generation
objPdf.AutoLaunch = true;
objPdf.FileName = "form" + formId.ToString()+".pdf";
//' start document generation
objPdf.PDFPAGE_Height = 1008;
objPdf.PDFPAGE_Width = 612;
objPdf.PDFPAGE_Size = PDFCreatorPilot3Lib.TxPDFPageSize.psLegal;
objPdf.BeginDoc();
HTML2PDFAddOn.HTML2PDF2Class objHtm = new HTML2PDFAddOn.HTML2PDF2Class();
//' initialize HTML engine
objHtm.StartHTMLEngine("","");
//' connect to PDF Creator Pilot instance
objHtm.ConnectToPDFLibrary(objPdf);
//' load HTML string with external image
objHtm.LoadHTMLString(objSb.ToString() ,"");
//' convert whole HTML document into PDF
objHtm.ConvertAll();
//' disconnect from PDF Creator Pilot instance
objHtm.DisconnectFromPDFLibrary();
objHtm = null;
//' finalize PDF generation
objPdf.EndDoc();

Stanislav
Member
# Posted: 9 Jul 2007 08:18 · Edited by: Stanislav


Hello,

Please use HTML2PDF2 property AutoAdjustContentWidth to fit HTML into PDF page size.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

klakkad
# Posted: 9 Jul 2007 12:43


I have used that still can when printing through PDF controls always print on letter size not on A4 size paper also. What else could be wrong.
Below is My updated Code

//' create pdf library object
PDFCreatorPilot3Lib.PDFDocument3Class objPdf = new PDFCreatorPilot3Lib.PDFDocument3Class();
//' initialize PDF Engine
objPdf.StartEngine("demo@demo", "demo");
//' set AutoLaunch flag to TRUE to automatically open the generated pdf generation
objPdf.AutoLaunch = true;
objPdf.FileName = "form" + formId.ToString()+".pdf";
//' start document generation
objPdf.PDFPAGE_Height = 1008;
objPdf.PDFPAGE_Width = 612;
objPdf.PDFPAGE_Size = PDFCreatorPilot3Lib.TxPDFPageSize.psLegal;
objPdf.BeginDoc();
HTML2PDFAddOn.HTML2PDF2Class objHtm = new HTML2PDFAddOn.HTML2PDF2Class();
objHtm.AutoAdjustContentWidth = true;
objHtm.AutoAdjustPageWidth = true;
//' initialize HTML engine
objHtm.StartHTMLEngine("","");
//' connect to PDF Creator Pilot instance
objHtm.ConnectToPDFLibrary(objPdf);
//' load HTML string with external image
objHtm.LoadHTMLString(objSb.ToString() ,"");
//' convert whole HTML document into PDF
objHtm.ConvertAll();
//' disconnect from PDF Creator Pilot instance
objHtm.DisconnectFromPDFLibrary();
objHtm = null;
//' finalize PDF generation
objPdf.EndDoc();

Stanislav
Member
# Posted: 9 Jul 2007 12:53


Hello,

You need to remove line

objHtm.AutoAdjustPageWidth = true;

from your code.

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

klakkad
# Posted: 9 Jul 2007 16:18


Removed that line. Still Did not work. Still I shows paper size = Letter only.

Stanislav
Member
# Posted: 10 Jul 2007 01:21


Hello,

Please send us value of the objSb.ToString() using our support form:

http://www.colorpilot.com/support.html

Best regards,
Stanislav
Two Pilots
www.colorpilot.com

klakkad
# Posted: 10 Jul 2007 13:40


Hi ,
I have uploaded objSb.toString using support forum. In that html string I am using page break class from style sheet which I have copied from HTMLadd on help.


.pbef { page-break-before: always;}
.paft { page-break-after: always;}
.pba { page-break-after: always; page-break-after: always;}

I hope this help to reolve this issue. We have right now hold to buy this product
until we we will resolve this issue.

thanks

klakkad
# Posted: 23 Jul 2007 13:01


Is there any answer on this? Still waiting for your feedback.

thanks

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.016

 

Page top