2015-09-07 39 views
0

我使用TcPDF生成一個包含單選按鈕組的PDF文件。使用TcPDF在adobe reader中關閉生成的單選按鈕組

當其中一個跨越到下一頁時,標籤保留,但單選按鈕本身消失。這隻發生在Adobe Reader,而不是我的任何其他讀者,如Firefox/Chrome/Foxit。

$this->ln(5); 
    $this->MultiCell(0, 5, '4. Question1', 1, 'L', 1, 1); 
    $this->Ln(3); 

    $val[$answers['v4']] = true; 

    $this->radio('v4', $val['good_verygood']); 
    $this->Cell(50, 0, 'Good/very good', 0, 0, 'L', 0); 
    $this->Cell(150, 0, '(= luxe)', 0, 1, 'L', 0); 

    $this->radio('v4', $val['above_average']); 
    $this->Cell(50, 0, 'Above average', 0, 0, 'L', 0); 
    $this->Cell(150, 0, '(= modernised)', 0, 1, 'L', 0); 

    $this->radio('v4', $val['average']); 
    $this->Cell(50, 0, 'Average', 0, 0, 'L', 0); 
    $this->Cell(150, 0, '(= on par)', 0, 1, 'L', 0); 

    $this->radio('v4', $val['moderate']); 
    $this->Cell(50, 0, 'Moderate', 0, 0, 'L', 0); 
    $this->Cell(150, 0, '(= not on par)', 0, 1, 'L', 0); 

    $this->radio('v4', $val['bad']); 
    $this->Cell(50, 0, 'Bad', 0, 0, 'L', 0); 
    $this->Cell(150, 0, '(= Needs short term maintenance)', 0, 1, 'L', 0); 

    $val[$answers['v4']] = false; 

,我已經修復這些PDF的很快的一個由只是對一個問題添加新頁面發生這種情況

$this->addPage(); 

但現在有幾十個OCCURENCES的多個PDF文件。

回答

0

我找到了解決方案。

雖然我不知道爲什麼只有Adobe有這個問題,並且只有當按鈕組位於分頁符時,問題就是單選按鈕的名稱。

在我的例子中,按鈕全部命名爲v4。 如果您通過v4.5或其他唯一名稱將它們命名爲v4.1,則PDF將正確呈現。