ezequiel
Member
Hello, we need to use a PDF form for filling some fields and generating a new pdf.
I've created a PDF file ("PruebaForm01.pdf") with one only field ("codcli"), using ArialMT font, size 10.
When I run my program, I receive some errors. The first is "Entry 4 is outside the range of list /FontName/BAAAAA+ArialMT. (560)"
I don't know waht is that BAAAAA, I guess it has to do with arial.afm but I really don't know.
I hope you can help me, we use Progress 9.1C, Windows 8.1 workstations.
The code is:
I've created a PDF file ("PruebaForm01.pdf") with one only field ("codcli"), using ArialMT font, size 10.
When I run my program, I receive some errors. The first is "Entry 4 is outside the range of list /FontName/BAAAAA+ArialMT. (560)"
I don't know waht is that BAAAAA, I guess it has to do with arial.afm but I really don't know.
I hope you can help me, we use Progress 9.1C, Windows 8.1 workstations.
The code is:
Code:
{pdf_inc.i}
DEF VAR cPdfFile AS CHARACTER.
FIND cliente WHERE cliente.codcia = "001"
AND cliente.codcli = "109690"
NO-LOCK NO-ERROR.
IF AVAILABLE cliente THEN DO:
cPdfFile = "E:\AquiPromec\pdf\Form\PruebaForm-" + cliente.codcli + ".pdf".
/* Definir PDF nuevo */
RUN pdf_new ("Spdf",cPdfFile).
/* Abrir PDF template */
RUN pdf_new_page ("Spdf").
RUN pdf_load_font
("Spdf",
"ArialMT",
"c:\windows\fonts\606.ttf",
"src\pdfinclude\arial.afm",
"").
RUN pdf_set_font ("Spdf", "ArialMT", 10).
RUN pdf_open_pdf ("Spdf","E:\AquiPromec\pdf\Form\PruebaForm01.pdf", "Cli").
RUN pdf_use_PDF_page("Spdf","Cli",1).
RUN pdf_fill_text("Spdf", "codcli", cliente.codcli, "").
RUN pdf_close("Spdf").
END.