PDF Include

PDFinclude is an open source Progress utility for dynamically generating reports in Adobe PDF file format without having to use third-party tools or utilities.
PDFInclude is a Free Libre Open Source Software (FLOSS), distributed under the Eclipse Public License.
PDFinclude is a stand-alone component that defines a toolset of Progress functions and procedures that aid in the output of a PDF file directly from 4GL/ABL, without having to generate a separate text file first (as in text2pdf.p).


Welcome in the PDF Include group. When you are using PDF Include, you are encouraged to subscribe to this group where you find the on-line tools to collaborate and discuss PDF Include. There is a discussion forum, you can submit issues (for bugs and enhancement requests), you can add new pages and other content, and best of all: there is an e-mail list. So subscribe, and then don't forget to go to your subscription details to enable the e-mail notification!


The PDF file format is an industry-standard for electronic document viewing. The PDF format allows for documents that can be accessed by a broad range of hardware and software devices (including PDAs and Internet browsers).
PDFinclude utilizes Progress code that is compliant with versions 8 and 9 of the Progress 4GL and the same source code can be used on multiple OS platforms - including Windows, AIX, Unixware, Solaris etc. - while running in different application environments (eg: GUI, CHUI, web-enabled and n-tier).


New!

  • 2nd of march 2010: The SVN repository has just been updated. This is the very last version of pdfinclude, containing all patches gathered from the PEG, lots of bug fixes, plus new exciting functionalities. Please test before I publish 3.3.4! You can download the last development version.



Main features
• supports international characters (East Europe, Cyrillic) for variable width base fonts only (Times and Helvetica). To be published in next version - see SVN version meanwhile
• supports custom True Type fonts (including Bar Coding fonts), and all 14 pdf base fonts
• supports remapping of characters
• supports ISO page formats A0,A1,A2,A3,A4,A5,A6,B5,LETTER,LEGAL,LEDGER
• supports portrait or landscape, and custom page formats, custom margins…
• supports document encryption (requires procrypt.dll)
• supports compression (requires zlib1.dll)
• includes graphic (geometric) procedures: lines, circles, eclipses, Bézier curves
• includes procedures to set Bookmarks show a Table of Content
• includes procedures for automatic page header and footer management
• include procedure to add watermarks
• supports text rotation
• supports html-ish tagged text for bold , italic and colour
• supports underline
• supports automatic pg line break and text justification
• supports JPEG, GIF and PNG images
• supports annotations (links, notes, stamps, mark-ups)
• supports loading an Adobe Distiller or OpenOffice PDF generated file to be used as a template (with limitations) – the file might contain images or embedded fonts To be published in next version - see SVN version for images and font support
• supports filling Adobe forms
• tools to create tables, calendars, matrices
• no external libraries are required except for compression and encryption
• comes with a lot of code examples


Downloads
See "attachments" at the bottom of this page for the downloads, including a download of a PowerPoint presentation from the Michigan PUG.
The big .zip download includes a Word document, which is the PDF Include documentation. I've also attached a PDF of that. Thanks Peter Frederick for sending the PDF!
You can always download the last development version from the SVN repository.


Contributions
Pro-Sys Consultants are the original authors of PDF Include.
You are welcome to submit patches through the mailing list. After review and discussion, they will be included in next release.
If you have to add functionality to PDFInclude for your own project, you are encouraged to submit the source code (although it is not required by the license) so that we can all improve the software and bring it to next level.


Also see:
License (Eclipse Public License)
Project page for issue tracking
Forum
Post a new Forum Topic


Last updated
jice 2nd of march 2010


Using Adobe Acrobat Pro w/ PDFInc

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").


Intigrated Development Environment

Hi Guys,
I'm looking to Implement the integrated Development environment using progress Openedge Architect (Common environment to develop test and deploy).
Im puzzle on how to do this. Anybody have Idea to how to achieve this.


Encryption of PDF file in Linux

I created an encrypted PDF in windows using
RUN pdf_set_parameter(,”Encrypt”,”TRUE”).
However now I would like to do the same in Linux.
But I will not be able to use procryptlib.dll and md5.exe so what is the alternate.
I tried to do as said in the document
If you are on a *NIX OS then you will need to compile the rc4.c object into a Shared Library
I tried
gcc -o rc4 rc4.c
But it is throwing an error.
rc4.h:33: error: syntax error before "endecrypt"
rc4.h:33: warning: data definition has no type or storage class
rc4.c:133: error: conflicting types for 'endecrypt'


How create a shading rectangle

Is possible create a shading rectangle?

I have a rectangle created with RUN pdf_rect2(...) but i would like that this rectangle has a shading.

Thanks.


UseTags & wrap_text

The wrap text functions don't check if UseTags=TRUE. Doesn't this throws pdf_text_width() and pdf_GetNumFittingChars() calculations off leaving them in?

Stripping the tags, StripBoldItal() + strip color", would return a closer width calculation excluding the bold/italic font width differences. If each word is stripped in the text parameter sent to pdf_text_width() then the original word, including tags, could be appended to the line.


Unique Output Filenames

Problem:
Using PDFextract.p as example; Multiple Users running same program can cause all sessions to APPEND to the same filename.

Line2748:
OUTPUT TO VALUE(SESSION:TEMP-DIR + pID + String(pPage) + ".txt") BINARY NO-MAP NO-CONVERT APPEND.

Patch that fixed problem in our unix environment:

DEF VAR uniqie_id AS CHAR NO-UNDO.
DEF VAR form_uniq AS CHAR NO-UNDO.

ASSIGN
unique_id = ENCODE(STRING(TODAY) + STRING(ETIME) + pFileName)
form_uniq = SESSION:TEMP-DIR + unique_id + "-".

OUTPUT TO VALUE(form_uniq + pID + String(pPage) + ".txt") BINARY NO-MAP NO-CONVERT APPEND.


Overlap

Can PDF include be used for overlapping one pdf document over another?

I have a pdf with an image and a pdf with text and an image. The pdf with text must overlap.

Thnx,
Ingmar.


external PDF created in MS Word

Hi All,

I can import PDF's i have created using PDFinc however the minute i try and use MS word and safe it as a PDF through a PDF converter it does then not allow me to use this PDF. Is it because i am using Word 2007 or perhaps because i havent used adobe distiller. Any help would be great.

The messages i get are:

'Could not load DLL procedure zlib1.dll. (3258)'
'**c:\OpenEdge\WRk\Inv-12-0.txt was not found. (293)'
'**c:\OpenEdge\WRk\Inv-17-0.txt was not found. (293)'
'**c:\OpenEdge\WRk\Inv1.txt was not found. (293)'


Error in ProcessFontDescriptorDictionary

Approximately line 2076 in PDFextract.p ProcessFontDescriptorDictionary:

IF ENTRY(4, text-temp, " ") = "R" THEN DO:
curr-ptr = SEEK(INPUT).

This will error out when text-temp contains less than 4 " " delimited entries.

I changed it to:

IF NUM-ENTRIES(text-temp, " ") > 3
AND ENTRY(4, text-temp, " ") = "R" THEN DO:
curr-ptr = SEEK(INPUT).

Has anyone else run into this or is it something unique to my environment?

TIA.


Using an External PDF Page

I'm following the example "Using an External PDF Page (2)" in the PowerPoint doc.

I've solved some run-time problems. but now the page it creates is blank except for the information I sent to it. It's my understanding it should have created an invoice based on samples\support\invoice.pdf.

Any suggestions/directions are much appreciated.

The resulting PDF is attached.

Here's the code I used:

{PDFinclude/pdf_inc.i "THIS-PROCEDURE"}

DEFINE VARIABLE i_Counter AS INTEGER NO-UNDO.

&scop PDFIdir d:\WDS\CCI\PDFinclude


PDF Include slow

Hello,

We've been using pdf include with several of our customers now and all works well. Except for one customer: it takes more than 5 minutes to generate a 24-page pdf, whereas this normally only takes about 20 seconds with ohter customers' systems.

The client is working in a Terminal Server environment with a very tight security policy. We suspect that this might be causing the slowdown, but we don't know what to look for.

Could you give us possible reasons for a slowdown? Have you ever heard from other people that reported the same problem?


Change Font Subsets

Any idea how can I change TrueType subsets?

I need some special south-slav characters, for example capital C with caron but if I use Arial font with PDF include, I see only the basic subset. If I check Arial font in Word (Insert symbol) I see this character in Subset "Extended Latin A".

thanks,
Biga

p.s. I tried create new AFM file with TT2PT1 utility and use -l (language) switch but did not work. (there is latin1,2,4,5 options but no extended latin A,B...)


pdf_text_rotate

Hi All,

Is it just me or does the pdf_text_rotate procedure not work?

I am trying to get a watermark to go across the page at an angle but when i add the rotate feature nothing changed no matter what the angle set.


Problem when create PDF

Hello every body!
Is anybody here that can help me with the PDF include? I'm new with this tool!!

The situation is this:
I'm creating a PDF Documents, and I'v already finished with that, but know I need to create just one PDF in which I can have all the PDF that I've already create.

I'm using one ".p" file for each PDF that I'm creating, to make it easy to de user, so in that way, the user makes click in a link and I run the .p file to create the PDF, and show it on the window explorer.


No accents on printing

PDF seems good both with Adobe and Foxit Reader but sending directly to the printer, the output contains illegal characters instead of accented letters. It is a printer setting problem or I have to change something in the PDF ? It is a Konica PDF capable office center.


#
AttachmentSize
PDFinclude.ppt presentation from the Michigan PUG958 KB
PDFinfo.zip6.13 KB
PDFincludeV7-1.0.zip for v721.69 KB
PDFinclude3.3.3.zip for v9+3.06 MB
PDFInclude-PRO-Documentation.pdf600.13 KB
Syndicate content