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

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.

Related

How can I set the line height of a multi-line PDF form field, and save it so it doesn't get reset by filling it?

I am having the exact same issue described in this question: Multiline pdf text box
I have a PDF that has some dotted lines that I want to convert into a fillable multi-line field. I tried the solution in the linked question, but my setting is not staying when I try to fill in the field outside of Acrobat.
When I am preparing the form inside Acrobat, I set the line height to 30 and it is lining up fine:
But when I save this PDF and then try to fill in the field outside of Acrobat, the line height setting does not stay. It gets reset every time:
It's super frustrating and I have scoured the internet looking for an answer but I have nothing yet. If someone knows what to do to get the line height looking like the first screenshot, please save my sanity.
I'm using Adobe Acrobat Pro DC 2021.001.20135 on macOS 10.14.6.
Thank you
You can't. Those settings don't "stick" when the field is cleared and there's no way to set them programmatically. It's best to simply remove the lines from the PDF.
As #joelgeraci stated, the settings don't stick.
However, if the form has to be manually fillable, removing the writing lines may not be the best idea. In this situation, it would be better to change the field's background color. When the field has no content, its background color is transparent, otherwise white. And that will cover the writing lines.

How to add floating button in PDF?

I would like to add a floating button in PDF. However, after doing a lot research on internet, I didn't find any answers.
I would like the button to float/move across the pages with the scroll bar as the document is scrolled. Is there a way to implement it in PDF?
Note: I would prefer to not to use JavaScript to implement it.
Thanks in advance.
As #mkl commented, it is not possible to add a floating button in PDF without using JavaScript.
PDF is meant to be used for fixed layout and not dynamically change as it is being viewed.
The closest I could find to what you are looking to do is this article about creating text that shows/hides depending on where the cursor is. I can't think of a way to leverage this though to change the position of a button as a user scrolls and even then you would most likely run into different PDF viewers handling it differently.

Access Report: Wrap Text Not Working

I have a report with unbound textbox's in them. I populate these fields onLoad.
The problem, though, is that the if the text is too long, it will not wrap. I have set Can Grow = Yes but this does not seem to work.
Is it due to the fact I am adding the string to the field OnLoad? If so, how can I overcome this and force the text to wrap? I would want the width to remain constant, but the height to grow.
Figured this out... I right clicked the text box and selected Size > To Fit...
I had the box big enough to accommodate a second line. It wouldn't ever word wrap until I made the change above. Can Grow and Can Shrink did nothing, but I left them selected.
I open report from code in design mode, make changes to control source of the text fields, save and close report and lastly open it in preview mode. The only way I get what I want.
I know this is an old post but I've been running into the same issue and haven't been able to figure out a solution until now.
One of the fields in print preview was getting cut off for me and despite my best efforts to make sure all the formatting settings were correct (i.e. Can Grow/Shrink: On) for both the detail section and the specific field. Again, this issue only happened in print preview, which meant the reports that were getting printed had the text cut off.
Solution:
I ended up realizing that all of the other text fields were set to Plain Text and the text field giving me the issue was set to Rich Text. I changed it to Plain Text and voila! It displayed everything without any issues.
My guess is that if you're having this issue, make sure all of the fields are set to the same property (Rich Text/Plain Text). Not sure why Access has trouble with this but I hope this solution helps someone else out.
The simple solution to this huge problem is listed below.
Convert the property of the textbox from plain text to rich text.
Set the text align property to distribute.
Enable can shrink and can grow property of the text box. (Yes)
Done.
After a lot trial-and-error, the solution seems to be that the text box that you want to scroll must have enough height to show two vertical lines. A textbox that is only one line high will not scroll. (You must also have Can Grow set to 'Yes' for both the textbox and the detail section.)
You also have to have the CAN GROW of the section that the text box is in set to YES as well as the text box.

Dynamic - Expanding Text Box in Adobe Acrobat X Pro?

I have some forms that I need to add expanding text boxes to.
I already have Multi-Line selected. And yes the scroll-bar appears when field is full and you keep entering text. However, when you go to print, it doesn't print out the full text.
I know in Adobe LiveCycle you can make dynamic forms, that bump onto the next page. I have done this, but you lose so much functionality in LiveCycle. To be dynamic you lose the ability to position objects without using tables and therefore doing designs and graphics are not as easy.
Has anyone found a way to do this in Adobe Acrobat X Pro?
At this point, I think it would be easier just to convince people that a web form is much easier to update and style any way you want with print CSS stylesheet.
Thanks for any suggestions.
To be dynamic you lose the ability to position objects without using tables and therefore doing designs and graphics are not as easy.
That is not true. A form being dynamic or not has nothing to do with having flowed or positioned content. A static form renders once on the server, a dynamic form can be re-rendered on the client and thus is able to reflect layout changes like hiding objects or altering heights of objects (more info).
With either form type you can have both positioned and flowed content. The trick is to divide your form into subforms according to the structure of the data you want to display (tutorial).
To let the text field grow automatically with the amount of text, enclose it in a subform with flowed content, allow multiple lines and enable "expand to fit" (or "auto-fit).

How to get rid of blank pages in PDF exported from SSRS

I have a two-page SSRS report. When I exported it to PDF it was taking 4 pages due to its width, where the 2nd and 4th pages were displaying one of my fields from the table. I tried to set the layout size in report properties as width=18in and height =8.5in.
It gave me the whole table in a single page of PDF, but I am still getting the 2nd and 4th pages blank.
Is the way I am doing it incorrect? How else can I get rid of those blank pages?
In BIDS or SSDT-BI, do the following:
Click on Report > Report Properties > Layout tab (Page Setup tab in SSDT-BI)
Make a note of the values for Page width, Left margin, Right margin
Close and go back to the design surface
In the Properties window, select Body
Click the + symbol to expand the Size node
Make a note of the value for Width
To render in PDF correctly Body Width + Left margin + Right margin must be less than or equal to Page width. When you see blank pages being rendered it is almost always because the body width plus margins is greater than the page width.
Remember: (Body Width + Left margin + Right margin) <= (Page width)
Another thing to try is to set the report property called ConsumeContainerWhitespace to True (the default is false). That's how it got resolved for me.
After hours of struggling with this problem, I stumbled upon a solution that worked for me:
In SSDT (2012), I had originally had my Page Setup/Page units set to Centimeters. When I changed this to Inches, strangely enough, I was able to export my report to PDF without having every other page be blank.
It is better to do this on the design surface (Visual Studio 2012 is shown but can be done in other versions) first before calculating any maths when editing an SSRS document.
Below the following numbers in red circles that map to these following steps:
In the design surface, sometimes the editor will create a page which is larger than the actual controls; hence the ghost area being printed.
Resize to the controls. Visually look at the width/height and see if you can't bring in the page on the design surface to size it to the space actually needed by the controls and no more.
Then try to create a PDF and see if that fixes it.
If #3 does not resolve the issue, then there are controls requiring too much of the actual page size and going over in either length/width. So one will need to make the size of the controls smaller to accommodate a smaller page size.
Also in some circumstances one can just change a property of the report page by setting ConsumeContainerWhitespace to true to automatically consume the spaces.
The problem for me was that SSRS purposely treats your white space as if you intend it be honored:
As well as white space, make sure there is no right margin.
If the pages are blank coming from SSRS, you need to tweak your report layout. This will be far more efficient than running the output through and post process to repair the side effects of a layout problem.
SSRS is very finicky when it comes to pushing the boundaries of the margins. It is easy to accidentally widen/lengthen the report just by adjusting text box or other control on the report. Check the width and height property of the report surface carefully and squeeze them as much as possible. Watch out for large headers and footers.
I have worked with SSRS for over 10 years and the answers above are the go to answers. BUT. If nothing works, and you are completely stuffed....remove items from the report until the problem goes away. Once you have identified which row or report item is causing the problem, put it inside a rectangle container. That's it. Has helped us many many times! Extra pages are mostly caused by report items flowing over the right margin. When all else fails, putting things inside a rectangle or an empty rectangle to the right of an item, can stop this from happening. Good luck out there!
In addition to the margins, the most common issue by far, I have also seen two additional possibilities:
Using + to concatenate text. You should use & instead.
Text overflowing the width of the specified textbox. So if your textbox only holds 30 characters and you try to cram 300 in there, you might end up with extra pages.
Have you tried to see if there is any white space on the right of your report? If so you can drag it back to the end of your report and then drag the report background back to the same spot.
On the properties tab of the report (myReport.rdlc), change the "Keep Together" attribute to False. I've been struggling with this issue for a while and this seems to have solved my issue.
I recently inherited a report that I needed to make a few changes. After following all the recommendations above, it did not help. The report historically had this extra page, and nobody could figure out why.
I right clicked on the tablix and selected properties. There was a checkbox checked that said add a page break after. After removing this, it prints on one page now.
I fixed this issue by doing the following. ( Using the latest version of Report Builder )
Step 1.) Go to View Tab
Step 2.) Check the Properties checkbox
Step 3.) Click inside the body of your report (it will update values in properties tab)
Step 4.) Take not of the width here
Step 5.) Right click in the gray area outside the report and click report properties
Step 6.) Add your left + right margin to your body width ( if that equals 10 then make your width 11)
Step 7.) Save
If your report includes a subreport, the width of the subreport could push the boundaries of the body if subreport and hierarchy are allowed to grow.
I had a similar problem arise with a subreport that could be placed in a cell (spanning 2 columns). It looked like the span could contain it in the designer and it rendered fine in a winform or a browser and, originally, it could generate printer output (or pdf file) without spilling over onto excess pages.
Then, after changing some other column widths (and without exceeding the body width plus margins), the winform and browser renderings looked still looked fine but when the output (printer or pdf) was generated, it grew past the margins and wrote the right side of each page as a 2nd (4th, etc.) page. I could eliminate my problem by increasing colspan where the subreport was placed.
Whether or not you're using subreports, if you have page spillover and your body design fits within the margins of the page, look for something allowed to grow that pushes the width of the body out.
Make sure the designer in visual studio is not going beyond your max width. Hover over the right page border and drag to the left to make sure the page does not go over your desired layout.
I just reduced all elements Width shorter than 8 inch and it is being corrected,
I did that with mouse,
your report Body should be shorter than 8 inch.
I've successfully used pdftk to remove pages I didn't want/need in pdfs. You can download the program here
You might try something like the following. Taken from here under examples
Remove 'page 13' from in1.pdf to create out1.pdf
pdftk in.pdf cat 1-12 14-end output out1.pdf
or:
pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf