久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='jpPag'></small><noframes id='jpPag'>

      <bdo id='jpPag'></bdo><ul id='jpPag'></ul>
  • <i id='jpPag'><tr id='jpPag'><dt id='jpPag'><q id='jpPag'><span id='jpPag'><b id='jpPag'><form id='jpPag'><ins id='jpPag'></ins><ul id='jpPag'></ul><sub id='jpPag'></sub></form><legend id='jpPag'></legend><bdo id='jpPag'><pre id='jpPag'><center id='jpPag'></center></pre></bdo></b><th id='jpPag'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jpPag'><tfoot id='jpPag'></tfoot><dl id='jpPag'><fieldset id='jpPag'></fieldset></dl></div>
    <tfoot id='jpPag'></tfoot><legend id='jpPag'><style id='jpPag'><dir id='jpPag'><q id='jpPag'></q></dir></style></legend>

        將 2 pdf 與 Zend Framework 合并

        Merging 2 pdf with Zend Framework(將 2 pdf 與 Zend Framework 合并)
        • <bdo id='GLpsT'></bdo><ul id='GLpsT'></ul>

            1. <tfoot id='GLpsT'></tfoot>

              <small id='GLpsT'></small><noframes id='GLpsT'>

              <i id='GLpsT'><tr id='GLpsT'><dt id='GLpsT'><q id='GLpsT'><span id='GLpsT'><b id='GLpsT'><form id='GLpsT'><ins id='GLpsT'></ins><ul id='GLpsT'></ul><sub id='GLpsT'></sub></form><legend id='GLpsT'></legend><bdo id='GLpsT'><pre id='GLpsT'><center id='GLpsT'></center></pre></bdo></b><th id='GLpsT'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='GLpsT'><tfoot id='GLpsT'></tfoot><dl id='GLpsT'><fieldset id='GLpsT'></fieldset></dl></div>

            2. <legend id='GLpsT'><style id='GLpsT'><dir id='GLpsT'><q id='GLpsT'></q></dir></style></legend>
                  <tbody id='GLpsT'></tbody>

                • 本文介紹了將 2 pdf 與 Zend Framework 合并的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試合并 2 個 PDF,一個在我的服務器上(不是動態生成的),一個在合并前生成并且沒有保存在服務器上的任何位置(我只希望我的客戶端下載它).所以我只有pdf的內容.兩種 PDF 具有相同的格式 (A4).

                  I'm trying to merge 2 PDF, one on my server (not dynamically generated) and one generated just before the merge and not saved anywhere on the server (I just want my client to download it). So I only have the pdf's content. Both PDF have the same format (A4).

                  合并后的文件將有 2 頁,并且不會保存在服務器上.

                  The merged file will have 2 pages and won't be saved on server as well.

                  因為我使用的是 Zend Framework,所以我更喜歡它的解決方案(在網上找不到……)還有什么建議嗎?

                  Since, I'm using Zend Framework, I would prefer a solution with it (can't find one online...) else any advice ?

                  (網上找到的常見解決方案,但不起作用)

                  因為人們懶得點擊.無論如何,代碼都在鏈接中,因為它是錯誤的并且不起作用.

                  Edit : because people are lazy to click. The code is in the link anyway since it's wrong and doesn't work.

                  我嘗試了下面的腳本,但我得到了錯誤:

                  I try the script below, but I get the error:

                  未捕獲的異常帶有消息的Zend_Pdf_Exception"'頁面附加到一個文檔,但在另一個上下文中呈現

                  Uncaught exception 'Zend_Pdf_Exception' with message 'Page is attached to one documen, but rendered in context of another

                  推薦答案

                  好的,根據@Gordon 在我的問題中的評論的指導,我找到了解決方案.

                  Alright, with the guide from @Gordon 's comment in my question, I got a solution.

                  1. 您必須至少擁有 Zend Framework 1.11(我使用的是 1.9,第一個錯誤)(感謝對這個問題的第 3 條評論)
                  2. 您必須從要合并的 PDF 中clone 頁面,否則,您的應用程序將打印一個錯誤(不言自明)(感謝 this slideshare 這對 Zend_Pdf 非常有趣)
                  3. 靜態 PDF 必須是 PDF <= 1.4(我的是 1.6).Zend_Pdf 無法解析 PDF 版本 > 1.4
                  1. You must have at least Zend Framework 1.11 (I was in 1.9, first error) (found thanks to the 3rd comment to this question)
                  2. You must clone page from the PDF you want to merge, else, your application will print an error (self explanatory one) (found thanks to this slideshare which is very interesting for Zend_Pdf)
                  3. The static PDF must be a PDF <= 1.4 (mine was 1.6). Zend_Pdf can't parse PDF which version is > 1.4

                  我使用這個應用程序來轉換我在 1.6 版中的靜態文件到 1.4.

                  I used this application to convert the static files I had in version 1.6 to 1.4.

                  這是我有和工作的粗略代碼(我知道它沒有優化,我稍后會做;但它仍然有用)

                  Here's the rough code I have and work (I know it's not optimised, I'll do it later; but still, it can be useful)

                  $pdf2show = new Zend_Pdf();  // Initializing the merged PDF
                  $pdf1 = Zend_Pdf::parse($pdfContent, 1); // $pdfContent is the generated one, got the content...
                  $template = clone $pdf1->pages[0]; // cloning the page (a must do)
                  $page1 = new Zend_Pdf_Page($template); // Creating the first page of the merged PDF with the previous content
                  $pdf2show->pages[] = $page1; // Adding this page to the final PDF
                  $pdf2 = Zend_Pdf::load('urlToYourPDF.pdf'); // Loading the statif PDF
                  $template2 = clone $pdf2->pages[0]; // cloning the page (a must do)
                  $page2 = new Zend_Pdf_Page($template2); // Creating the second page of the merged PDF with the previous content
                  $pdf2show->pages[] = $page2; // Adding this page to the final PDF
                  sendToWebBrowser('title', $pdf2show->render());
                  

                  sendToWebBrowser 是將 PDF 內容發送到瀏覽器的函數,title 作為...標題.$pdf2show->render() 將合并的 PDF 內容生成為字符串.

                  sendToWebBrowser is a function sending the PDF content to browser with the title as... title. $pdf2show->render() produces the merged PDF content as a string.

                  這篇關于將 2 pdf 與 Zend Framework 合并的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                    • <small id='D8pds'></small><noframes id='D8pds'>

                            <tbody id='D8pds'></tbody>
                          <i id='D8pds'><tr id='D8pds'><dt id='D8pds'><q id='D8pds'><span id='D8pds'><b id='D8pds'><form id='D8pds'><ins id='D8pds'></ins><ul id='D8pds'></ul><sub id='D8pds'></sub></form><legend id='D8pds'></legend><bdo id='D8pds'><pre id='D8pds'><center id='D8pds'></center></pre></bdo></b><th id='D8pds'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='D8pds'><tfoot id='D8pds'></tfoot><dl id='D8pds'><fieldset id='D8pds'></fieldset></dl></div>
                            <bdo id='D8pds'></bdo><ul id='D8pds'></ul>
                            <legend id='D8pds'><style id='D8pds'><dir id='D8pds'><q id='D8pds'></q></dir></style></legend>

                          • <tfoot id='D8pds'></tfoot>
                            主站蜘蛛池模板: 欧美a级成人淫片免费看 | 在线观看亚洲精品 | 精品欧美一区免费观看α√ | 成人黄色av | 国产精品3区 | 婷婷综合色 | 成人不卡 | 成人国产精品久久久 | 欧美一级免费 | 91欧美激情一区二区三区成人 | 国产精品久久久乱弄 | 久久精品a级毛片 | 久久成人午夜 | 久久久高清 | 国产精品精品视频一区二区三区 | 欧美成人一区二区三区 | 欧美视频第二页 | 黄色一级免费 | 日韩成人中文字幕 | 欧美精品久久久久久久久久 | 一级片免费视频 | 久久综合久色欧美综合狠狠 | 97人人澡人人爽91综合色 | 天堂视频一区 | 一二三区视频 | 国产精品久久久久无码av | 国产99久久精品一区二区永久免费 | 天天拍天天草 | 欧美久久不卡 | 久久亚洲一区二区 | 91大神在线资源观看无广告 | 成在线人视频免费视频 | 欧美精品久久 | 男人天堂视频在线观看 | 亚洲欧美日韩精品久久亚洲区 | 91精品久久久久久久久久入口 | 一区二区精品 | 一区二区av| 久久久国产精品入口麻豆 | 成人精品鲁一区一区二区 | 99小视频|