OpenOffice .xls export to PDF causes check boxes to overlap

[OpenOffice][1] Excel file export to PDF is being done programmatically and I wish to know if there is a way to resolve this issue by maybe passing some kind of flag or something during the conversion process which will make the cell background transparent in the PDF document. Please note an example PDF output. The original Excel file does not overlapping edges at all: http://www.freeimagehosting.net/uploads/4ab8dd9af0.jpg This is the original Excel file before PDF export: http://www.freeimagehosting.net/uploads/0cdcaad47a.jpg Both OpenOffice 2.4 and 3.0 have this same defect. Suggestions would be most welcome, this is the last thing holding this project up. Follow this link for an example on the OpenOffice website: http://user.services.openoffice.org/en/forum/viewtopic.php?f=20&t=13528 Here is the issue tracker link: http://www.openoffice.org/issues/show_bug.cgi?id=97856 And some code for you, it is [Jython][2] 2.2.1 with Java 2.5. def _save_as_pdf(self, docSource): dirName=os.path.dirname(docSource) baseName=os.path.basename(docSource) baseName, ext=os.path.splitext(baseName) dirTmpPdfConverted=os.path.join(dirName + DIR + PDF_TEMP_CONVERT_DIR) if not os.path.exists(dirTmpPdfConverted): os.makedirs(dirTmpPdfConverted) pdfDest=os.path.join(dirTmpPdfConverted + DIR + baseName + ".pdf") url_save=self._create_UNO_File_URL(pdfDest) properties=self._create_properties(ext) try: try: self._xstorable=UnoRuntime.queryInterface(XStorable, self._doc) self._xstorable.storeToURL(url_save, properties) except AttributeError,e: self.logger.info("saving as pdf has problem: (" + str(e) + ")") raise e except: self.logger.info("storeToURL exception") raise finally: self.logger.info("converted document " + baseName + ext) if not self._doc: xCloseable = UnoRuntime.queryInterface(XCloseable, self._doc) if not xCloseable: try: xCloseable.close(false) except CloseVetoException, (ex): xComp = UnoRuntime.queryInterface(XComponent, self._doc) xComp.dispose() else: xComp = UnoRuntime.queryInterface(XComponent, self._doc) xComp.dispose() self._doc=None def _create_properties(self,ext): properties=[] p=PropertyValue() p.Name="Overwrite" p.Value=True properties.append(p) p=PropertyValue() p.Name="FilterName" if ext==".doc": p.Value='writer_pdf_Export' elif ext==".rtf": p.Value='writer_pdf_Export' elif ext==".html": p.Value='writer_pdf_Export' elif ext==".htm": p.Value='writer_pdf_Export' elif ext==".xls": p.Value='calc_pdf_Export' elif ext==".tif": p.Value='draw_pdf_Export' elif ext==".tiff": p.Value='draw_pdf_Export' properties.append(p) return tuple(properties) [1]: http://en.wikipedia.org/wiki/OpenOffice.org [2]: http://en.wikipedia.org/wiki/Jython
Why don't you raise an actual BUG with OOo (I know you've already asked on their fora).

以上就是OpenOffice .xls export to PDF causes check boxes to overlap 的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏