Understanding more about form xobjects in PDF? - pdf

I have a PDF which contains form Xobject's in it. Each and every form xobject contains a full page (duplication and hidden) content in it. But for user only showing(on page screen) one image remaining all are hidden. I f I am trying to flatten it the duplication content also flattening and showing like below image.
So to solve this problem we have to flatten only the visible content(Even I don't know which content is visible to user screen?) not entire form xobject. Is that will solve the problem. Or is there any way to solve this problem programmatically?

Related

Adobe Pdf - Hiding buttons on PNG export

Good Day,
I'm creating a form in Adobe and need to use the form exported as an image. However, when exporting, the buttons appear in the output image. I was wondering if there is a way to hide the buttons when exporting the from as an PNG image.
Cheers
You can hide your button before exporting it to an image.
Okay! Since there were not very helpful answers to my question and after searching the web for a while, according to help desk link below, the buttons can be invisible except for a rollover act that make them visible. This way the when the form is exported as an image the unwanted buttons like "Form Reset" will not be exported to the image and yet it's there to reset the form.
Hide an Acrobat button except during rollover

How to resize a PDF page with itext without scaling the content (in Java)

I have been trying for days to find a solution for my problem: I want to resize an existing pdf from A4 to a given individual smaller page size. And I need the real page size to be changed, not the crop box or something like that.
The original pdf will always consist of only one page and all content (e.g. texts (some with hyperlinks), images and tables) will fit into the wanted page size. In fact I want to trim the pfd page to a rectangle that exactly fits to the existing content (the content starts at the left upper corner).
As I found no way to change the page size of an existing pdf page, I tried to create a new pdf with the wanted page size and copy all the content of the original pdf to the new pdf. But that doesn't work either (I can create the new pdf page with the wanted size, but I cannot copy the content).
Any solution (iText 5 or 7) is welcome.

Multipage form using itext with Acrofield and Dynamic table

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.

Expanding textbox stopping page breaks in PDF conversion

I have a simple report that has an image and a textbox within the body (a rectangle). The textbox is set to 'Allow Height to Increase'. The rectangle is set to 'Page Break After'.
Normally this works fine if the contents of the textbox span a few lines. However, when the textbox expands over multiple pages the Page Break is ignored. This only happens when exporting to PDF, yet works as expected in Preview mode.
I'm hoping someone has some insight into this behaviour or can recommend an alternative page structure that will achieve the desired results.
Could you please check the Rectangles property
kept contents together on a single page
in a parent Rectangle object, this will always keep items together where possible.
You could also set page setup settings (margins, gutters, printable page size...) to make sure that they are not affects on exported PDF document.

How do you create PDF Form Fields that will expand to contain their content?

I have a field on a PDF form that could be too small for the contents it needs to hold. Since it is already nearly the size of the page, I need a way to tell adobe to let that field grow to cover more than a page.
I haven't found any way to do this. LiveCycle seems to act like you can do it, but everything tried so far, does not do anything more than add a scroll bar in the online view, and the fails to print all the content. Acrobat doesn't even act like it is possible.
Any ideas?
If you select the field, go to the Layout Palette (Palettes Menu -> Layout (Shift + F9) ) and select the "Expand to Fit" box next to the width and/or height it will expand when more text is entered.