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? - pdf

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.

Related

create white margin around pdf document without shrinking

I've got the following problem:
I want to print a PDF file as a booklet, using Adobe Acrobat Reader (in a copy shop, they got no better printing software). Unfortunately, Adobe shrinks my file down to the printable area. Instead I want to have it printet 50%(cause it'a a booklet, every page shrinked down by half) the original size, without shrinking any further, the margins simply cut off (just the egde of some pics etc, not important, the size matters)
My idea was, to use a software to create a white margin around every page, covering the stuff in the not-printable-area. Then adobe would not shrink anything down.
Does anyone know a tool for my problem? I couldnt find one. (running on either Windows or Ubuntu)
I would prefer a command line tool, cause I got a bunch of files to print.
Or is there a way to tell adobe Reader to not shrink anything (I know it works with normal printing, just couldnt figure it out with booklet printing)
Or are there any other ideas out there?
thanks in advance
Nevermind, i found a solution:
I created a PDF template with a white margin, transparent in the middle.
Using 'pdftk' I can easily set my original file als background of my template.
Done.

iText: why would adding an image cause text to appear fuzzy in PDF?

I'm using iText with Java to create a PDF file. I'm trying to place a paragraph on left, and float an image on right (e.g. next to each other). Using the following code does insert the image, but it also makes the text fuzzy on the entire page (other pages are fine).
// add image
Image img = Image.getInstance(imgPath);
img.setAlignment(Image.RIGHT | Image.TEXTWRAP);
img.scaleToFit(1000, 72f); // 1" height
//img.setSpacingBefore(0f); // does not have any effect
document.add(img);
// add text
Paragraph par = new Paragraph("some text here", styleBody);
par.setSpacingBefore(20f);
document.add(par);
If I remove the image portion of the code, the text looks clean. This is my first attempt at adding an image next to text. Must be doing something obviously wrong. Any idea what could cause this?
I was able to solve this problem. The code above is perfectly fine. The problem was I was using a PNG image with transparency. When I removed the transparency (by re-exporting the image from Illustrator with transparency turned off), I was able to create PDFs with clear text.
I think the transparency forces the PDF page to be written in CMYK color scheme rather than RGB, which perhaps causes this issue.
Hope this helps someone else. I searched everywhere but couldn't find any leads talking about fuzzy text in iText.

SSRS textbox clipping when exporting to PDF

I was working with an SSRS report that uses multiple textboxes in a list control. I found that when I ran and exported my report to PDF (and printed/exported to .XPS), certain textboxes would just ever so slightly get clipped.
Note: when the report rendered in SSRS development env., every textbox looked fine and the text never got clipped. The issue just occurs when exporting, and on seemingly random textboxes (random to me).
I've tried adjusting the height and width properties of the textboxes, and the CanGrow property to true/false. Even making the text a different size (like 5 point) or even a different font made no difference. The amount of text that filled the field didn't matter. I made sure the margins on the page were sufficient. I also made sure there were no other report objects that were overlapping the offending textboxes. Neighboring textboxes that displayed fine were set to be perfectly aligned vertically with ones that had the text problems, and still no luck.
None of these options above worked. I have also seen a few questions on stackoverflow that are similar, but not exact.
How do I keep these textboxes from clipping the text when exporting to PDF?
Thank you.
Sample: textbox text is cut off very slightly on SSRS report exported to PDF for certain textboxes
I have solved my own issue after some tinkering, though perhaps its not the best solution out there but it works.
I hard coded a space character at the end of each textbox field's expression that had the clipping issue,
For example:
=First(Fields!zipCode.Value) + " "
The only minor draw back is that it shifts the alignment of the text left by one space. Hope this helps.
I played around with all sorts of options with indent, padding and even added a gutter column. This seemed to work for a while but when the problem raised its head again, I just changed my font.
I think there might be something up with "Calibri" and "Calibri Light" but "Candara" seems fine.
Bit frustrating this only shows up on server generated pdfs as it makes the feedback loop so much longer.

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.

A Text value change on Powerpoint by using OpenXml doesn't fit

I use OpenXml for creating custom powerpoint presentation in this way: I put a keyword on the presentation, I found it during process with OpenXml and change the text value. Everything work fine but the fit option doesn't work at first.
The text box has options "Autofit: Shrink text on overflow; Wrap text in shape: On"
After my process, the new text appear on the right place but the autofit is not done, I need to click on the text box and make a input for see the autofit work. I think that PowerPoint only check option after a modification.
What I want is the autofit option is called at the end of the process. Can anyone help me?
I hope you understand what I want to do.
Thanks.
It's not possible using just OpenXML. The <a:normAutofit/> tag is used by a client application, such as PowerPoint, to render the text larger or smaller, as needed. OpenXML doesn't actually render anything, so until the client does, it will just read the text as if it is not auto-fitted.
There are a few options to think of to control this - none of them great however. One would be to use VSTO or VBA in PowerPoint to check all shapes on PPTX open and if they have a AutoFit tag, to re-render them. A second way would be to do all the font measurements yourself based on the shape's width & height and then set the font scale to the appropriate percentage. Another would be to make a textbox large enough to fit the largest amount of text you will ever insert and then turn autofit off.
Sorry this doesn't really help you immediately. I've done tons of research on this particular subject and it's all bad news.