1

我正在尝试在 HTML 文档之后创建的上传文件上创建分页符。

当我将云端硬盘文档下载为 HTML 文件时,会使用<hr style="page-break-before:always;display:none;">元素创建分页符。<hr>所以我尝试复制它,但它在上传时变成了一个简单的。

$file = new Google_DriveFile();
$file->setTitle('Procesodecontroldeproducto.html');
$file->setDescription('A test document');
$file->setMimeType( 'text/html');

$createdFile = $service->files->insert($file, array(
    'data' => '<p>This is the first page</p><hr style="page-break-before:always;display:none;"><p>This should be on the second page</p>',
    'mimeType' => 'text/html',
    'convert' => true
));

我的问题是:有没有办法在将 HTML 文档转换为驱动器文档时创建分页符?

4

0 回答 0