ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Problems Creating A PDF From A Printer File Using WCST(*PDF)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems Creating A PDF From A Printer File Using WCST(*PDF)

    We thought we had this licked, it all seemed too easy, but we created pdf's on the iSeries by using the WCST(*PDF) customization object and they looked fine.
    No problems with Acrobat Reader or printing, but when we try to import the PDF into a PIM it comes up with errors and we really need to get the PDF's into the PIM.

    One option is to open each PDF and then print to a PDF, but that's labour intensive and the users are not amused!

    The best PDF error checker I have found is: https://www.datalogics.com/products/...s/pdf-checker/ and the JSON output from this indicates:

    Fonts Results
    Errors:
    Uses Base 14 fonts not embedded in document: Courier (1 instance)

    We are on A7.1 on the iSeries and there are no options on WCST(*PDF).
    The only thing I could see is in this article:
    You might want to take these into consideration when deciding which font to use for printing.

    which suggested overriding the printer font.
    So I added an override of:
    FNTCHRSET(*FONT)
    to the printer file, but it made no difference.

    I did see some other posts about creating PDF's on the iSeries, so hopefully someone has some knowledge that might help.

    In the past I have used other software to manipulate the data and to create PDF's, but the company doesn't want to go down that route.
    We do have Catapult (BDC/Fresche) as part of our Websmart package, but we are trying to move away from that and Catapult is proving a little buggy as well.

    If there is a way to overcome this that would be great. Open to ideas and suggestions and as always, thanks for any help.
    Poddys Rambles On

  • #2
    It's seems that the checker you found checks for PDF/A files, where each font must be embedded. Probably PIM wants that type of PDF but maybe not, maybe is it configurable.

    I never succeeded producing a PDF/A from WSCST but maybe you will

    WCST(*PDF) is not the only PDF WSCST, see
    Code:
    WRKOBJ OBJ(QCTXPDF*) OBJTYPE(*WSCST)
    You can extract source with
    Code:
    RTVWSCST DEVTYPE(*CTXFORM) MFRTYPMDL(*PDF or *PDFEMBEDTT or *PDFIBMWT)
    The "language" reference is here

    I ha
    ve tried
    Code:
    :FGIDMAPE
    FGID = 11
    TECH = TYPE1
    NAME = 'Courier'
    WEIGHT = MEDIUM
    ITALIC = NO
    FILENAME = 'Courier'
    and
    Code:
    :FNTDIRE
    TECH = TYPE1
    PATH = '/home/me/Font'.
    :EFNTDIRTBL.
    Code:
    OVRPRTF FILE(QSYSPRT) DEVTYPE(*AFPDS) FONT(11) FNTCHRSET(*FONT) TOSTMF('/home/me/pdfa-test.pdf') WSCST(ME/PDFA)
    CRTBNDRPG
    About the font files types I have tried ttf and pfb files (because of this page)

    But no luck
    Nicolas

    Comment


    • Poddys
      Poddys commented
      Editing a comment
      Thanks very much Nicolas, that's something to go on. Will give it a try.
      It's not an area I have really delved into, despite my years of experience on the iSeries.

  • #3
    Well one test done, hopeful but no luck so far.

    I followed Nicolas's guide and also that of the WCST language and tag values, creating a new customization member as follows:

    Code:
    :WSCST DEVCLASS=CTXFORM.
    :CTXFRMTBL.
    :OUTDTAFMT
    FORMAT=PDF.
    :FILEEXT
    STRING='pdf'.
    :FGIDMAPTBL.
    :FGIDMAPE
    FGID = 11
    TECH = TYPE1
    NAME = 'Courier'
    WEIGHT = MEDIUM
    ITALIC = NO
    :EFGIDMAPTBL.
    :EWSCST.
    I did notice that you (Nicolas) had your font name in upper case. It didn't seem to make a difference.
    Hopefully there is a correct combination somewhere.
    I will keep trying.
    Poddys Rambles On

    Comment


    • vazymimil
      vazymimil commented
      Editing a comment
      I have tried generating pfb files with fontforge from the fonts in C:\Program Files (x86)\Adobe\Acrobat Reader DC\Resource\Font.. but no

  • #4
    You might need a PTF.

    "If an *AFPDS printer file or spooled file reference AFP fonts via the CDEFNT or FNTCHRSET parameter or keyword and TS1 is used to generate PDF output, the AFP fonts will not be converted to
    Type 1 fonts and embedded into the PDF." https://www.ibm.com/support/pages/apar/SE65280

    Comment


    • vazymimil
      vazymimil commented
      Editing a comment
      I have SI61567 (V7R3) applied here. But...

    • Poddys
      Poddys commented
      Editing a comment
      Thanks very much, it sounds like the PTF is what we need.
      Whether it fixes the problem, we will have to wait and see.
      Appreciate the help and we will look to get that applied.
Working...
X