Topic Options
#56950 - 04/12/19 03:45 PM What is faster - Dynamic PDF versus in form
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 665
PP7 Form using Optimized Postscript. Form has several dozen PDF files that are added as resources. There are conditions on each PDF file that decide which ones are printed for the specific record. Is it faster to call the images in dynamically from the hard drive of the server or to add them to the form as a resource?

Code:
define(&resType,integer,0)
define(&iCount,integer,0)
define(&i,integer,0)
define(&filePath, string, 'C:\\Resources\\FormXYZ\\'+'State'+'_'+@(1,1,2)+'.pdf')

&resType := resourcetype(&filePath)
&iCount := pdfpagecount(&filePath)

if(&resType=6)
for(&i, 1, 1, &iCount)
showPDF(&filePath,&i,&width,&height)
showpage()
endfor()
else()
moveto(0, 0)
lineto(&width, 0)
lineto(&width, &height)
lineto(0, &height)
closepath()
moveto(0, 0)
lineto(&width, &height)
moveto(&width, 0)
lineto(0, &height)
stroke()
endif()
_________________________
Uomo Del Ghiaccio
--------------------

Top
#56952 - 04/15/19 01:22 PM Re: What is faster - Dynamic PDF versus in form [Re: Uomo Del Ghiaccio]
Yannick Fortin Offline
OL Expert

Registered: 08/25/00
Posts: 345
Loc: Objectif Lune Montréal
As a resource. You get two performance enhancements.

1. The PDF is pre-translated to PostScript instead of being translated every time the form is run.

2. As an internal resource, the PDF is cached. This leads to faster RIP time on the printer.
_________________________
Yannick Fortin, Team OL

Top
#56956 - 04/16/19 05:38 PM Re: What is faster - Dynamic PDF versus in form [Re: Uomo Del Ghiaccio]
Uomo Del Ghiaccio Offline
OL Expert

Registered: 02/21/01
Posts: 665
Yannick,

Just to confirm, you are saying that it is faster to print if the PDF added as a resource in the form versus calling the PDF from a folder.

How about if you download the PDF to the virtual drive and then call the PDF from the virtual drive?

I believe that the PDF is pre-translated as a EPS when you download to the virtual drive, but I don't know if it is cached.
_________________________
Uomo Del Ghiaccio
--------------------

Top
#56957 - 04/16/19 09:04 PM Re: What is faster - Dynamic PDF versus in form [Re: Uomo Del Ghiaccio]
Yannick Fortin Offline
OL Expert

Registered: 08/25/00
Posts: 345
Loc: Objectif Lune Montréal
> Just to confirm, you are saying that it is faster to print if the PDF added as a resource in the form versus calling the PDF from a folder.

Yes, that's correct.

As for the virtual drive, you should get the same kind behavior and benefits as the internal resources, including caching. Iy may not be exactly the same, because the resources are stored on the file system rather than in memory, but it should still be way faster than resources retrieved from a folder.
_________________________
Yannick Fortin, Team OL

Top