PDF Creator Pilot in questions and answers


PDF Creator Pilot:       Home       Download       Features       Tutorials       FAQ       Pricing       News

 

  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 use .ShowText for text output. 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?
  22. I develop a .NET application using PDF Creator Pilot and it works well on my machine. When I deployed this application to another machine it stopped working and I got error messages.
  23. How can I integrate PDF Creator Pilot with my application? How can I register your PDF Library from the installer?
  24. I downloaded your demo, installed it as per the directions and added the sample code. It compiled, but it failed to run due to CoCreateInstance not returning S_OK. I am using MFC.

 

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

    Yes, we do. Please check step-by-step samples here.

  2.  

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

    Windows XPSP3/2003/Vista/7/8/2008/10/11. No 3rd-party software is required.

  4.  

  5. Does the library need Adobe Reader or any other software to produce PDF documents?

    No additional software is required.

  6.  

  7. What are the limitations of the demo version?

    The demo version places notification messages inside the generated pdf documents.

  8.  

  9. What is the proper way to install PDFCreatorPilot.DLL on a user’s computer?

    Place PDFCreatorPilot.DLL in the {%system%} directory and use the regsvr32.exe system utility to register PDFCreatorPilot.DLL. You can also use PDFCreatorPilot.msi installer package from Redistributable folder.

  10.  

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

    Set PDF = CreateObject("PDFCreatorPilot.PDFDocument4")
    PDF.SetLicenseData "demo", "demo"
    J = PDF.AddImageFromFile("picture.jpg")
    PDF.PageWidth = 310
    PDF.PageHeight = 310
    PDF.DrawImage J, 5, 5, 300, 300, 0
    PDF.SaveToFile "test.pdf", true
  12.  

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

    Use the NewPage or AddPage method.

  14.  

  15. How can I change the paper size of the generated PDF document?

    Use PageSize property.

  16.  

  17. How can I generate a PDF document "on-the-fly" directly in user’s browser window?

    The technique is quite simple:

    1. Create a PDF Creator Pilot object and initialize it:
    Set PDF = CreateObject(“PDFCreatorPilot.PDFDocument4”)
    PDF.SetLicenseData “demo”, “demo”

    2. Fill the PDF document with text, graphics etc.
    PDF.ShowTextAt 40, 40, “Hello.”

    3. Use the “response” ASP object to stream the document to the browser directly, or write the data into the output “response” object. A Byte array is required. Use the GetBuffer method of PDF Creator Pilot to get the generated PDF document as a byte array.

    4. Use the following code:

    Response.Clear
    Response.ContentType = "application/pdf"
    Response.AddHeader "Content-Type", "application/pdf"
    Response.AddHeader "Content-Disposition", "inline;filename=test.pdf"
    Response.AddHeader "Content-Length", PDF.GetBufferSize
    Response.BinaryWrite PDF.GetBuffer
    Response.End

    As a result, the user will see your PDF document in the browser window.

    You can find an example for ASP that will generate a simple PDF document and output it via browser: see Visual Basic example.

  18.  

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

    Yes, you can use PDF Creator Pilot in ASP.NET as a normal ActiveX library. View an example for ASP.NET.

  20.  

  21. Can I draw or print to a PDF?

    Use GetDC method and draw on this HDC as on the printer or screen HDC.

  22.  

  23. Is there support for windows metafiles (EMF)?

    Yes, use PlayMetaFile or PlayMetaFileFromHandle methods. Your metafile will be imported retaining its vector nature.

  24.  

  25. How can I decrease the size of the generated PDF document?

    Set Compression property to coFlate to compress the PDF document. You can also turn off font embeding by setting FontEmbedStyle to esNotEmbed. This will prevent any used font to be embed in PDF document.

  26.  

  27. 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.AddImageFromFile(Server.MapPath(“logo.jpg”))

  28.  

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

    Use AddEditBox method.

    Set PDF = CreateObject("PDFCreatorPilot.PDFDocument4")
    PDF.SetLicenseData "demo", "demo"
    PDF.AddEditBox 20, 35, 120, 50, "ed1"
    PDF.AnnotUnicodeText = "Enter text here..."
    PDF.ControlBackColor = &HDDCCFF
    PDF.ControlTextAlign = 1 'taCenter
    
    PDF.AddEditBox 20, 65, 120, 80, "ed2"
    PDF.AnnotUnicodeText = "password"
    PDF.EditBoxMaxLength = 8
    PDF.IsPasswordEditBox = true
    PDF.ControlTextAlign = 2 'taRight
    PDF.ControlUnicodeHint = "This is the hint for edit"
    
    PDF.AddEditBox 20, 95, 220, 170, "ed3"
    PDF.AnnotUnicodeText = "Multiline edit box"
    PDF.ControlTextAlign = 1 'taCenter
    PDF.ControlVerticalAlign = 0 'vaTop
    PDF.IsMultilineEditBox = true
    PDF.ControlFont = PDF.AddFont("Georgia", false, false, false, false, 1) 'FontCharset.fcDefault
    PDF.ControlFontSize = 14
    PDF.ControlTextColor = &HFF00CC
    
    PDF.AddEditBox 20, 185, 120, 200, "ed4"
    PDF.AnnotUnicodeText = "No border here"
    PDF.ControlShowBorder = false
    
    PDF.SaveToFile "test.pdf", true
  30.  

  31. How can I draw "wrapped" text?

    Use ShowTextLines method to draw wrapped text.

  32.  

  33. How can I draw a rectangle measured in millimeters (mm)?

    You can change the PageResolution 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.

  34.  

  35. I use .ShowText for text output. How can I change the text alignment?

    Use ShowTextAligned and ShowTextLines methods.

  36.  

  37. If there is a way to create bookmarks in the PDF?

    Take a look at the AddOutlineAfter example. You can use MainDemo.vbs from PDF Creator Pilot installation package as an example.

  38.  

  39. Do you have documentation for JavaScript in PDF forms?

    Adobe Technical Note #5186, "Acrobat Forms JavaScript Object Specification", gives details on the contents and effects of JavaScript scripts.

  40.  

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

    Yes, you can use the PDF library in C++ Builder mostly the same way as in Delphi. Click here to view examples.

  42.  

  43. I develop a .NET application using PDF Creator Pilot and it works well on my machine. When I deployed this application to another machine it stopped working and I got error messages.

    The problem may appear because of interop DLL (Interop.PDFCreatorPilotLib.dll). Don’t forget to deploy your interop DLLs as well. Put it in the same directory where your application EXE file is (for WinForms applications) or put it in the “bin” directory (for web applications). Also do not forget that interop DLLs are bound to the original COM DLL location, so we recommend to put PDFCreatorPilot.dll to the folder “%WINDIR%\system32”.

  44.  

  45. How can I integrate PDF Creator Pilot with my application? How can I register your PDF Library from the installer?

    Below you can find samples for some of the most popular installers (InnoSetup, NSIS, Wix). The samples include scripts for integrating PDF Creator Pilot and a client application.

    For example, to register the PDF Creator Pilot DLL:

    1. In InnoSetup, use the following string: “Source: “PDFCreatorPilot.dll”; DestDir: “{Destination_Directory_Path}”; Flags: regserver;”

    2. In NSIS, first use !include “Library.nsh”, then !define DLL ‘”PDFCreatorPilot.dll”‘ for the registration library.

    PDF Creator Pilot and NSIS
    PDF Creator Pilot and InnoSetup
    PDF Creator Pilot and Wix

  46.  

  47. I downloaded your demo, installed it as per the directions and added the sample code. It compiled, but it failed to run due to CoCreateInstance not returning S_OK. I am using MFC.

    The problem is that MFC, VC, and VC++ do not automatically initialize COM support. To do correct this, insert these lines into your code:

    BOOL CYourApplication::InitInstance()
    {
    HRESULT hRes = ::CoInitialize(NULL); // init COM work in the beginning
    
    // ... some auto generated code
    
    ::CoUninitialize(); // clear COM used memory before exit
    
    return ... // some return statement
    }

 


PDF Creator Pilot:       Home       Download       Features       Tutorials       FAQ       Pricing       News