문제

Is it possible to use Google Docs for Mailer templates? How can I change template variables via API? Basically, I want to keep a template on Google and export it as a PDF file after changing few variables like name, address etc. Is it possible to do it completely via API in PHP?

EDIT

LiveDocX is providing these features but I think docs are not share-able.

EDIT

Is it true that even if no answer is acceptable I've to accept some answer because of bounty?

도움이 되었습니까?

해결책

Not quite sure that I understand the use case here, but I think what you are wanting to do it to generate a series of PDFs that have been personalized with info like name and address to then mail out as shared web accessible documents on Google Docs.

If that is right, then yes I think you should be able to do that.

Step 1) Create the template in Google Docs.

Step 2) Copy the document using the API here: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#copying_documents

Step 3) Edit the new document with the personalized info using the API here: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#updatingchanging_documents_and_files

Step 4) Share the new document with the appropriate person using the API here: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#managing_sharing_permissions_of_resources_via_access_control_lists_acls

If you are specifically wanting the customized PDF the API for exporting is here (but I don't think you can share it as a PDF, though you can share it as a read-only document): http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#downloading_documents_and_files

Hope that helps.

다른 팁

I am not sure if this is exactly what you are looking for, but in section 5 of this link it describes how to send out auto-generated e-mails based on a template/spreadsheet combo:

http://www.google.com/google-d-s/scripts/mail_merge.html#section5

You can store one document as a template having some meta-symbols (like {0}) to be substituted with real values. Then retrive that document from google docs using API and substitute all metas with values. Then save the result of substitution as a new document, export it as PDF and remove.

All these things should be available through API.

정확히 답변이 아닙니다. 그러나 당신이 그것을 알아내는 데 도움이 될 수 있습니다 : 설정은 다음과 같습니다 :

"목록보기 조회 임계 값
데이터베이스 쿼리가 한 번에 포함 할 수있는 최대 조회, 개인 / 그룹 또는 워크 플로 상태 필드를 지정하십시오."

API에서 관리 필드에서 상속 된 메타 데이터 및 개인 / 그룹 필드가 모두 룩업 필드에서 상속됩니다.조회에서 상속하는 다른 필드 유형이있는 것도 가능합니다.

라고 말하면서, 이들을 사용하는 많은 "장면 뒤에"필드가 많이 있기 때문에 해당 유형 중 하나의 모든 것을 계산할 수 없습니다.또한 셀에 대한 별개의 열로 종속 조회를 계산하지 않고 정의 된 8 개의 목록과 다른 관리 메타 데이터 등의 목록이 있습니다.

you could just download the docs ( code.google.com ) and use preg_replace_callback or something like that to do the template replacement in your php code, then upload it again (as a copy), but performancewise this would suck ...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top