AFPTOOL FAQ

Following are some of the frequently asked questions about AFPTOOL. When reporting problems, please send them via email stating the problem. Let me know what version of AFPTOOL you are using. See the main FAQ for instructions on finding the version you currently have installed.

    • I can't open the PDF file that is created by AFPTOOL. What should I do?
    • First, open the PDF file in a text editor and look for these lines (or similar) near the bottom:
stream
q 
572,000000 0 0 742,035950 20,000000 19,964050 cm /Im1 Do 
Q 
endstream
    • /Type /Catalog /OpenAction [ 3 0 R /FitBH 762,000000 ]
    • If you see commas in the numbers, as shown above, instead of decimal points (or periods) the issue is with the QLOCALE system value. Changing this to *NONE should fix the issue. You can also change the value of the LOCALE property of the job to *NONE for the job that's running the AFPTOOL command as well.
    • When I create a PDF file with AFPTOOL some of the document is truncated.
      • Some of the time this can be caused by the workstation customization object that is used for the conversion. Try changing the value of the Manufacturer Type and Model (MFRTYPMDL) parameter from *WSCST to *WSCSTLETTER to see if this helps.
      • If this does not solve the problem, please see the next section for more information.
    • I am getting a PDF without the correct fonts and/or the document is being truncated.
      • If you have tried the previous fix for document trucation and this did not work or it's obvious in your document that there is font substitution being performed then you will need to make sure that you have all of the fonts you are using in the AFPDS spooled file installed on your AS/400.
      • The reason for this is when you print a document to a printer the fonts resident on the printer itself are used to create the printout. With AFPTOOL there is no printer involved so the Host Print Transform API is used to perform the conversion. If the fonts used in the document are not installed on your machine then the system will perform font substitution causing the report to be converted incorrectly.
      • Make sure you have all of the fonts installed on your AS/400 that are used in your AFPDS spooled files.
  • I am receiving the error "Error during TIFF to PDF conversion step." What should I do?
      • First you should check the job log to see if you are receiving any errors similar to the following:
      • Object C0S0CR10 in library *LIBL not found.
      • If there are errors like this in the job log it means that the fonts used in your AFPDS spooled file are not found on your system.
      • The reason for this is when you print a document to a printer the fonts resident on the printer itself are used to create the printout. With AFPTOOL there is no printer involved so the Host Print Transform API is used to perform the conversion. If the fonts used in the document are not installed on your machine then the system will perform font substitution causing the report to be converted incorrectly.
      • Make sure you have all of the fonts installed on your AS/400 that are used in your AFPDS spooled files.
      • If you do not have any of these errors, make sure that you are specifying a fully qualified stream file in the STMF parameter and that you have the proper authorities to the directory in the qualified path.
      • If you are receiving an error like this "TIFFOpen: /tmp/<filename>.tif: Cannot open." check your system for objects named TIFF2PDF type *PGM and TIFFLIB type *SRVPGM.
      • If you see one or the other in more than one library (like ESEND and AFPTOOL), make sure that AFPTOOL is above any other libraries containing the objects in the library list.
  • When using AFPTOOL I can an error stating something similar to: "Cannot read TIFF header." What coule be the problem?
  • Normally when this happens the issue is one of a few possibilities:
      • The spooled file's Printer Device Type is not *AFPDS
      • The spooled file you're trying to convert is no longer avaiable
      • The path you're specifying for the target file is invalid
      • Be sure to double check these items.