Using Adobe Acrobat Pro w/ PDFInc

Project:PDF Include project
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi All,

I have used open office to create a document, exported it to pdf and left blank areas where i wish to place 'Form Fields' from adobe acrobat pro. when blank the document works in PDFInc no problem when i add the form fields in then Save As... etc then try and use this document it kicks out an error about the page, see below:

The error returned = "pdf_use_PDF_page Invalid Page # for PDF ID = fs stream = spdf"

Here is the code i have used.

{ pdf_inc.i "THIS-PROCEDURE"}

DEFINE VARIABLE i_Counter AS INTEGER NO-UNDO.

RUN pdf_new ("Spdf","c:\testformfill.pdf").

RUN pdf_open_PDF("Spdf","c:\testform1.pdf","fs").

RUN DoNewPage.

RUN pdf_close("Spdf").

/* ------------------- INTERNAL PROCEDURES ------------------------- */
PROCEDURE DoNewPage:
RUN pdf_new_page("Spdf").
RUN pdf_use_PDF_page("Spdf","fs",1).
RUN pdf_fill_text("Spdf","Date","99/99/9999","").
END.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#1

Hi
I suppose the latest versions of acrobat are not supported in pdfinclude.
I do not have this software to test myself, and it's been a while since nobody modified this part of the code.
Must be a problem in the parsing of the acrobat generated pdf file in pdfextract.p. Could you please send it to me? (I'd rather a patch to fix the issue ;-)
++


#2

Hi,

The code i have used is in the original post. is there anything else i do to assist?

Thanks,

xscottehx


#3

yes, can you please create such an "invalid" document from acrobat and attach it to this page? I will try to see if there is an easy fix (don't promise anything though, very little time to dedicate at the moment)


#4

Here is the requested pdf with form fields created via acrobat pro.

Thanks for your help!

xscottehx


AttachmentSize
FreeServicing2.pdf8.17 KB

#5

Currently pdfinclude supports pdf 1.4.
before any deeper investigation I noticed that your pdf file is pdf 1.6, this would be a possibility. It does not have the 1.4 xref part at the end either, which could explain the problem.
I'm on vacation starting today, so I don't think I'll be able to have a look before october.
Can you please try to save as pdf 1.4 and tell us if that works? If not, then attach the 1.4 document here again?
Thanks in advance


#6

Hi,

Still no further forward when saving the document as version 1.4. I have attached this docuemnt.

I have only attached one form field for testing purposes.

Enjoy your Holiday, hope to hear from you when you return.

Thanks again,

xscottehx


AttachmentSize
fstest.pdf8.15 KB

#7

nice, I've fixed a small problem, and now my Progress 9.1E session crashes ;)
in LoadObjectPointers, pdf_extract.p:
IF INDEX(text-ptr,"~/Prev") > 0 THEN DO:
text-temp = TRIM(SUBSTR(text-ptr, INDEX(text-ptr,"~/Prev") + 5)).
text-temp = REPLACE(text-temp,"~/"," ").
text-temp = REPLACE(text-temp,">>",""). /* 14-JAN-2011 jcc: might happen ;) */
prev-ptr = INT(ENTRY(1,text-temp," ")).

add the line with the comment.
gonna investigate a little bit.


#8

Anyway the version I'm about to publish has support for forms generated directly with OpenOffice.org
You just have to open the from toolbar, add some fill-in, choose each fill-in name to match what you want, then export to pdf. I will put an example in the samples directory.
@xscottehx: might we close this one?


#9

The very last version I just uploaded (rev. 136) opens and processes correctly fstest.pdf, the form is filled. Can you please try with the full form, saved as pdf 1.4?