I have a use case where I want to remove table data from pdf pages. I tried using pdf aspose but it seems cell.getTextFragments() is not coming while setting cellfragment.setText("").
Reference Link: https://docs.aspose.com/display/pdfjava/Remove+tables+from+existing+PDF
Related
I am making some Google Docs containing tables. For each table, I set the table property to prevent "Allow row to overflow across pages". It works fine in Google Docs.
However, when I download the Google Doc to PDF, some of the rows are split across pages. This can happen even if a table has only one row.
I have looked here, and couldn't find this question, although there is a related one about HTML to PDF Prevent table cells from breaking across page when converting html to pdf.
I can't be the only one to have encountered this. Any answers please?
Thanks
This looks very much like a bug in Google's PDF exporter, I was able to reproduce it. One workaround would be to use a different PDF exporter. Download your google doc as an ODT, open ODT in Word or LibreOffice and then save as PDF. This worked for me, the PDFs saved by both Word and LibreOffice Writer had a tall row starting from the new page, as intended.
I am trying to create a PDF in BIRT and I need to have bookmarks linking from a summary page to each detail page. The links work fine in the HTML preview and a similar http link works in published PDFs. However, the internal links do not work in the PDF format.
What I have tried so far is setting the bookmark property to "detail_" + row["nodeid"] and setting the hyperlink to the same. As stated, this works for the HTML preview, but not the PDF export.
The PDF has automatically generated TOC items that I would prefer to leverage off, but I don't know how to link to those.
Is there a way that I can get the PDF output to contain the required links using either bookmark properties, or the generated TOC items?
Sample PDF output (Customer data removed, alternate locations selected)
The solution to the problem lies not in the format of the bookmark/hyperlink, but in the placement of the bookmark.
The problem was, I was placing the bookmark on the row of the table I wanted to link to. Instead, the bookmark needed to be on the label in the first column of the row.
I believe the issue is that, in the HTML version, the table row is a <tr> tag, however in the PDF, the row doesn't physically exist, so there's nothing to set the bookmark on. However the label/text item exists in both versions, so the bookmark is created correctly.
In my project, I need to merge several pdf documents. Each document contains only one page with several optional content groups (OCG). Many OCGs are not activated and are not visible in the pdf viewer application.
After merging this pdf with PDFMergerUtility, I get merged PDF files.
In this pdf, except for the first page which is correct, in all other pages, all the ocg are visible. The previously disabled ocg becomes visible.
I don't know now if I'm using PDFMergerUtility correctly or if it's a bug, do you know, how to merge several pdf in a single file with the correct display ocg in java?
Is it possible to completely delete an OCG in pdf format?
Edit :
I currently use pdfbox-app-2.0.6, I will try with 2.0.7.
I use this pdf with all OCG disable : simple pdf layer exemple
and I try to merge with a copy of himself.
Sorry my other pdf are confidentiel.
This was fixed in issue PDFBOX-3973 and will be part of release 2.0.14 in a few weeks / months. It is available as a snapshot until release.
In the merged file both OCGs will coexist.
I have two pdfs both with limited data i.e. Single page. I want to merge the data of one pdf into another pdf but on the single page (It should not create the other page to append the external data). Is there any way to do this using pdfbox or pdfclown ?
I'm new at working with itext and I'm looking for help.
I'm creating a PDF document based on a PDF template which contains a form with acrofields. This form is composed by some fields on top page and a table and has only one page.
The PDF document generated will have one or more pages depending on table's size (if size content extends predefined size, table should continue in the second page). Also every page should display fields on the top with the same information.
I've tried to solve it following "AddExtraTable" example, but I didn't get to keep the fields on top in all pages, only in the first one.
I've tried also to solve it with PdfCopy. This approach displays the fields on top in all pages but table content is not properly displayed.
Can someone help me?
PS: I have to use itext 2.1.7 because of project requirements.