Dynamic - Expanding Text Box in Adobe Acrobat X Pro? - pdf

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).

Related

Draw in MS-Access (overcome object limit)

I'm placing hundreds and hundreds of boxes in dozens of carts with an optimization algorithm.
Problem:
How the boxes fit in the carts should be presented to the Access user visually and in print, and it should support moving individual boxes to other cart, by supplying a box ID and target cart ID and redraw. More ideally, via drag-and-drop.
What have I tried:
Rectangle objects on a Form. Hits the object limit after a few hundred boxes.
DuckDuckGone. Looked at Canvas and CanvasShapes. They seem to not be canvases proper?
Looked at external tools to say, compose a PDF. It wouldn't be interactive, though, and data would have to be passed as XML or similar.
Question:
Is there a way to draw say, 1000 rectangles in any type of window (Form, Report, etc.) in Access 2013 using VBA?
The rectangles are coordinate-based, so that it can't be presented as a table; you wouldn't see the physical dimensions of the carts and how the boxes fit in them.
In reports, you can, with the Report.Line Method.
But it will work (AFAIK) only in Print Preview and Print, not in Report view. So no interactivity whatsoever will be possible.
But I'm pretty sure it's your best option in Access.

Determine the Text that can Display in Multiline PDTextField

Is there a way to determine the text that will actually display in a PDTextField when the PDF prints? If I call setValue and then getValue, it returns all of the text even though it will not all display.
I am trying to fill out a form with a limited size multiline text field that has the notation to attach another page for more details. I would like to limit the text to that which will display and generate the added detail page.
Thanks for indulging a PDFbox newbie.
There is no direct way to find that out as the details of the text layout such as line breaks, padding, line spacing are hidden inside the non public class PlainTextFormatter inside the org.apache.pdfbox.pdmodel.interactive.formpackage. So you'd need to replicate that code.
PDFBox tries to resemble the calculations done by Adobe Acrobat and Adobe Reader but the details of such calculations are not part of the PDF specification. So doing your calculation is only valid for a similar layout model. Other form filling applications might have a slightly different layout model and as a result your results will not apply to these.
In addition to that Acrobat (and PDFBox) place text although it might be partially clipped. Look at the results of the AlignmentTest.javaunit test to see what I mean. So one might have a different expectation to what 'fitting' really means.
As I've thought about passing the information about which text fitted back to the calling application anyway I've opened an enhancement request https://issues.apache.org/jira/browse/PDFBOX-3413 for that.

Possible to control PDF layout with iText?

I'm writing some logic to build a large single PDF file that our users can print at their convenience. I'm using Java's iText library (through Clojure's clj-pdf).
I'm trying to have the PDF show the same exact template form on every single page, however I can't seem to find any documentation or indication that one can have PDF content "fit to a page".
The text in these forms varies a little bit, so there's a chance it might require more of fewer text lines per page. This means that the content has a chance of spilling over to the next page, or being too short, making the next page creep up into the previous one, breaking the requirement of "one form per page" for the rest of the document.
I'm trying to figure out if my option is pretty much only to manually check the length of the text on each page and potentially crop it by hand if I goes over n lines, or if the PDF format somehow supports a smart way of having paragraphs+tables+headings all fit in one page. Some UI systems allow you to control how spill-over is handled, anywhere from cropping to resizing the font, so I'm curious if PDF supports anything of that sort.
Edit: ended up going with pagebreaks for simplicity, wasn't aware of that option when I wrote this question.
If you want to take control over the space taken by text, for instance to fit it on a single page, the way to go would be to create a ColumnText object and to add the content in simulation mode. If the text fits the page, add it for real. If it doesn't, use a smaller font size. This is demonstrated in the MovieAds example where snippets of text are fitted into AcroForm fields.

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.

Modify character spacing in a PDF form field

I'm trying to build a web app to programmatically fill out a PDF form. I am going to configure my form first in Adobe Acrobat, then write a Java app with iText to fill out all the form fields via user input from the web. The base form I need to fill out comes from the US government. They created form fields with extremely large kerning (character spacing) values I need to change. However, there appears to be no way to modify this value in the Acrobat UI.
Does anyone know how to manipulate character spacing on form fields in Acrobat 8.0 for Windows? I could try to use iText to programmatically manipulate the kerning of the original document, but this would be much more tedious.
I believe I figured this out: kerning is called "combing" in acrobat, and each of the form fields have been "combed". The strange thing is this option isn't checked when I view the properties of the form field, but "combing" is the behaviour I was attempting to replicate.