Re: PDF problem
On Jul 24, 2014, at 5:43 AM, Walt Nelson wrote:
> Based on your description, it seems that a workaround might be to write some
> code to save the file to disk and bring it back in as soon as it is uploaded
> - then you can do the merge of PDF's.
The file is received as data (blob) by 4D Web Server and then I am saving it to disk with BLOB TO DOCUMENT. The
documents are uploaded over time. Requests for downloads can be for an individual document, a category of
documents, or a complete group or package of documents. Each request is returned as a single pdf document.
Like your suggestion I thought maybe I could do something in 4D to "fix" the document. I tried various levels
1. On receipt of the data/blob
I could not find anything that I could to with the blob except to create the pdf on disk.
2. Directly to the pdf document after creating it.
The only thing I could think of doing was SET DOCUMENT TYPE(Document;"PDF") which proved interesting in
that before set the type the function Document type returned BLOB for the new document. After setting the
type with SET DOCUMENT TYPE it returned PDFº. I am not sure what that degree symbol at the end means or if it
has any significance. If I check the types of the other working PDFs that were created by 4D and any other PDF
in the Finder the type returned by the Document Type function is blank. In any event, no matter what I set the
type to it still does not work. If I use SET DOCUMENT TYPE on the other working PDFs they continue to work fine.
3. Load the PDF back into 4D and do something to it there and save it back to the disk.
The only way I can see to load the PDF back into 4D is into a blob which takes me back to the same situation as
option 1 above.
4. Change the method I am using to merge the pdfs.