Components for Developers © 2000-2008, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

How create PDF files with the PDF library
in questions and answers

 

  1. Do you have step-by-step tutorials for Visual Basic, ASP, Delphi or Visual C ?
  2. What are the system and software requirements for the PDF library?
  3. Does the library need Adobe Reader or any other software to produce PDF documents?
  4. What are the limitations of the demo version?
  5. What is the proper way to install PDFCreatorPilot.DLL on the user computer?
  6. How can I incorporate images into the PDF document?
  7. How do I create a new page in the document?
  8. How can I change the paper size of the generated PDF document?
  9. How can I generate PDF document "on-the-fly" directly in user's browser window?
  10. Can I use the PDF library with ASP.NET?
  11. Can I draw or print to a PDF?
  12. Is there support for windows metafiles (EMF)?
  13. How can I decrease the size of the produced PDF document?
  14. Why did I get an error message when I tried to add an image to a PDF from ASP?
  15. How can I create an editable text field in the PDF document?
  16. How can I draw "wrapped" text?
  17. How can I draw a rectangle measured in millimeters (mm)?
  18. I entered some text using .PDFPage_TextOut. How can I change the text alignment?
  19. If there is a way to create bookmarks in the PDF?
  20. Do you have documentation for javascript in PDF forms?
  21. Can I use PDF Creator Pilot from C++ Builder?

 

  1. Do you have step-by-step tutorials for Visual Basic, ASP, Delphi or Visual C ?

  2. What are the system and software requirements for the PDF library?

    Windows 2000/XP/2003/Vista. No 3rd-party software is required.
  3. Does the library need Adobe Reader or any other software to produce PDF documents?

    No additional software is required.
  4. What are the limitations of the demo version?

    The demo version places notification messages inside the generated pdf documents.
  5. What is the proper way to install PDFCreatorPilot.DLL on a user's computer?

  6. How can I incorporate images into the PDF document?

    Set PDF = CreateObject("PDFCreatorPilot.PDFDocument3")

    PDF.StartEngine "demo@demo","demo"
    PDF.AutoLaunch = false
    PDF.DocumentInfo_CreationDate = Now

    PDF.FileName = "TestImage.pdf"
    PDF.DocumentInfo_Title = "PDF Creator Pilot Demo"

    PDF.BeginDoc

    J = PDF.AddImageFromFile("image.bmp")

    PDF.PDFPAGE_Width = 310
    PDF.PDFPAGE_Height = 310

    PDF.PDFPAGE_ShowImage J,5,5,224,183,0

    PDF.EndDoc

  7. How do I create a new page in the document?

    Use the .NewPage function.
  8. How can I change the paper size of the generated PDF document?

    Use the .PaperSize property
  9. How can I generate a PDF document "on-the-fly" directly in user's browser window?

  10. Can I use the PDF library with ASP.NET?

  11. Can I draw or print to a PDF?

    Use the .hDC property of the library and draw on this HDC as with the printer or screen HDC.
  12. Is there support for windows metafiles (EMF)?

    Yes, use the .PDFPAGE_PlayMetaFileFromFileName method. Your metafile will be imported retaining its vector nature.
  13. How can I decrease the size of the generated PDF document?

    Check the .Compression to change PDF compression ratio.
  14. Why did I get an error message when I tried to add an image to a PDF from ASP?

    Try to use the Server.MapPath function, for example:

    K = PDF.AddImageFromFileName (Server.MapPath("logo.jpg"), 1)

  15. How can I create an editable text field in the PDF document?

    Use the .PDFANNOTATION_ methods and properties to create interactive fields, comboboxes, and listboxes:

    ' create PDF Creator Pilot object
    Set PDF = CreateObject("PDFCreatorPilot.PDFDocument3")

    ' start pdf engine
    PDF.StartEngine "demo@demo","demo"
    ' set document creation date
    PDF.DocumentInfo_CreationDate = Now
    ' set output filename
    PDF.Filename = "sampleform.pdf"
    ' set document title
    PDF.DocumentInfo_Title = "Form Demo"
    ' set option to automatically open pdf document in Adobe Reader if available
    PDF.AutoLaunch = true
    ' set document compression to flate to reduce pdf file size
    PDF.COmpression = 1 ' 1 = ctFlate

    ' start document generation
    PDF.BeginDoc

    ' create edit control
    PDF.PDFPAGE_CreateControl_Edit "samplefield1", 20, 30, 200, 45
    ' set default text
    PDF.PDFANNOTATION_Text = "simple edit with centered text"
    ' set font color
    PDF.PDFANNOTATION_Font_Color = 0
    ' set font style to bold
    PDF.PDFANNOTATION_Font_Style_fsBold = true
    ' set font size to 12
    PDF.PDFANNOTATION_Font_Size = 12
    ' set justification to center
    PDF.PDFANNOTATION_Justification = 1 ' center alignment

    ' create text field
    PDF.PDFPAGE_CreateControl_Edit "samplefield2", 20, 50, 120, 70
    ' set default text
    PDF.PDFANNOTATION_Text = "pass"
    ' limit max characters number that can be inputed to 4
    PDF.PDFANNOTATION_MaxLength = 4
    ' set "password" show mode to hide characters
    PDF.PDFANNOTATION_IsPassword = true
    ' set font size to 10
    PDF.PDFANNOTATION_Font_Size = 10
    ' set text justification to left
    PDF.PDFANNOTATION_Justification = 0 ' left alignment
    PDF.PDFANNOTATION_Hint_Caption = "This is the hint for edit"

    ' create text field
    PDF.PDFPAGE_CreateControl_Edit "samplefield3", 20, 75, 150, 110
    ' set default text
    PDF.PDFANNOTATION_Text = "multiline edit"
    ' set multiline mode for text field
    PDF.PDFANNOTATION_Multiline = 113
    ' set font color
    PDF.PDFANNOTATION_Font_Color = 113
    ' set font style to italic and bold
    PDF.PDFANNOTATION_Font_Style_fsItalic = true
    PDF.PDFANNOTATION_Font_Style_fsBold = true
    ' set font size to 10
    PDF.PDFANNOTATION_Font_Size = 10
    ' set text justification to right alignment
    PDF.PDFANNOTATION_Justification = 2

    ' create text field
    PDF.PDFPAGE_CreateControl_Edit "samplefield4", 20, 115, 200, 150
    ' set default text
    PDF.PDFANNOTATION_Text = "simple edit with white border"
    ' set font size
    PDF.PDFANNOTATION_Font_Size = 12
    ' set border color to white
    PDF.PDFANNOTATION_BorderColor = 16777215
    ' set justification to left
    PDF.PDFANNOTATION_Justification = 0 ' left alignment

    ' end document
    PDF.EndDoc

  16. How can I draw "wrapped" text?

    Use the .PDFPAGE_TextOutBox command to draw wrapped text.
  17. How can I draw a rectangle measured in millimeters (mm)?

    You can change the .Resolution property of PDF Creator Pilot. The default resolution is 72 DPI (72 dots per inch). This is how you can calculate the size of your objects using resolution.
  18. I entered some text using .PDFPage_TextOut. How can I change the text alignment?

    Use the .PDFPAGE_TextBox instead of the .PDFPage_TextOut method.
  19. If there is a way to create bookmarks in the PDF?

    Take a look at the .PDFOUTLINES_ commands. Look at the "demo.vbs" example in the /examples/other/ folder of PDF Creator Pilot.
  20. Do you have documentation for JavaScript in PDF forms?

  21. Can I use PDF Creator Pilot from C++ Builder?

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts | Site map

© 2000-2008, Two Pilots