문제

And can this be done without a really expensive solution like Apose? That costs way more than I can possibly spend.

Essentially, I need to be able to let someone upload a document and retain its formatting to display it through flex. If there's another way to do that, I'd appreciate a solution to that as well.

Thanks

도움이 되었습니까?

해결책

Try out LiveDocx: http://www.phplivedocx.org/2009/02/06/convert-doc-to-pdf-in-php/

$phpLiveDocx = new Zend_Service_LiveDocx_MailMerge();

$phpLiveDocx->setUsername('username')
            ->setPassword('password');

$phpLiveDocx->setLocalTemplate('document.doc');

// necessary as of LiveDocx 1.2
$phpLiveDocx->assign('dummyFieldName', 'dummyFieldValue');

$phpLiveDocx->createDocument();

$document = $phpLiveDocx->retrieveDocument('pdf');

file_put_contents('document.pdf', $document);

unset($phpLiveDocx);

다른 팁

You could try bullzip, which they have a programming interface via ActiveX/COM, the onus is on your part to select the bullzip pdf printer and submitting the document to be converted into pdf.

Edit: Here's a link to another library code on Codeproject. And here's another library called ITextSharp found here, the tutorial to using this is found on CodeProject also, here, and another source on how to create a simple PDF using the aforementioned library.

Hope this helps, Best regards, Tom.

If you know perl, check out jpg2pdf

I'm not sure what this is writen in, but give it a try: Doc2pdf

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