Load PDF from Memory

In some cases it is required to load a PDF directly from memory. For example when the PDF is hosted in a databse or to design a secure PDF Viewer.

There are lots of advantages of loading a PDF directly from memory to Aloaha. Besides the performance increase it is possible to load a PDF in such a way that there are no temp files on the local harddrive. For example for a secure PDF viewer.

It is very easy to load a document from memory. In the following example editor1 is the referenced aloaha.edit object.

'the following code loads a PDF document in into the bytearray/memory
Dim PDFBytes() As Byte
PDFBytes = editor1.read_bytes_as_variant(cstr("c:\document.pdf")) 

'the following line passes the bytearray to Aloaha
Call editor1.store_PDF_in_MEM(PDFBytes) 

'please use the following line as it is. It instructs Aloaha to load the previous stored bytearray into the viewer.
Call editor1.open_PDF(cstr("http://memory.pdf"))


 LoadFromMemDemo.zip (5,28 KB)

Please ask...

Although we really tried hard, there are always questions left open.

Please send us your question.
We would be glad to answer it.
PDF SDKPDF Form Saver SDKPDF Forms APIPDF Forms OCXPDF Form OCX FAQLoad PDF from MemoryDelphi ActiveXMerge XML with PDFExport XML DataAdd Submit ButtonDynamik Time StampSmart Card APIAloaha Web ServicesAloaha Print MonitorAloaha Remote ConfigurationWebDAVLDAP ClientProgramming Office MacrosIIS Event Sinks