Skip to main content

adobe acrobat - Format Fonts for Text Field Default Values


I am kind of new to Adobe Acrobat. I am using Adobe Acrobat Pro X. I am creating a fillable form, from scratch, basically. What I would like to do is be able to format a read only texbox so that it says something like this:


While this text is bold, this text will not be bold


The above is a sort of label before a check box or series of fill-in text boxes.


I can't seem to find a way to make only a portion of the text bold (or italic) the way that want. I realize I could build this word and then make the PDF, however, since the design of the form (and it's fillable) controls may change, and having to redesign the controls each time seems like a pain in the butt. I also realize I could add separate text boxes, choosing the -Bold or -Oblique font types, but that seems rather painful as well.


I am open to whatever solution works best. If there is an easy way to make design changes from Word, after the fillable fields are added. I am open to that, too.



Answer



Craft form and textbox in Adobe LiveCycle Designer - part Adobe Acrobat Pro X.


RichText tricks for TextField in Designer


Use Tab Order and Hierarchy windows in Adobe LiveCycle Designer (Shift+F11) for navigation.


Adobe Acrobat Pro X


Text Field Properties -> Options -> Custom calculation script >



Text Field Properties -> Calculate-> Custom calculation script > Edit ...


var ObjectName = "Text1";
var JoinArrayStyle = new Array();

JoinArrayStyle[0] = new Object();
JoinArrayStyle[0].text = "While ";
JoinArrayStyle[0].textSize = 22;
JoinArrayStyle[0].textColor = color.red;

JoinArrayStyle[1] = new Object();
JoinArrayStyle[1].text = "this text is bold";
JoinArrayStyle[1].fontWeight = 900;
JoinArrayStyle[1].textSize = 24;
JoinArrayStyle[1].textColor = color.dkGray;

JoinArrayStyle[2] = new Object();
JoinArrayStyle[2].text = ", this text will not be bold.";
JoinArrayStyle[2].textSize = 22;
JoinArrayStyle[2].textColor = color.black;

this.getField(ObjectName).richValue = JoinArrayStyle;

Properties Text Field


Allow Rich Text Formmating !!!


Calculation sheet Adobe Acrobat Javascript


Javascript window


Result ...


Thx!


Plan B ... )))



Create simple table


Select table Select table


Change color border to Adobe corp. default style)). enter image description here


Hold down the Ctrl key and the left mouse button, the pointer over the desired odd line, so select them. After any highlighted field by right click, go and choose "Border and shading ..." Erase few rows border


Align text right, press Ctrl+R, or press button in panel after select table column. Align text right


Erase left cell border Erase left cell border


Call Border and shading dialog Border and shading dialog


Set option in fill cell dialog. Fill cell dialog


Change text color tool Microsoft Word 2007.


Disabled color (vbGrayText) not set and not work in macros ... and I set dark grey)). Change text color tool Microsoft Word 2007


Save as Pdf Microsoft Word 2007. I not use Adobe add-on. Save as Pdf Microsoft Word 2007


Microsoft Word 2007 Pdf resolution quality. Microsoft Word 2007 Pdf resolution quality


Microsoft Word 2007 Pdf options font.


Pdf font save options


Auto open pdf after save as Microsoft Word 2007 dialog.


Auto open pdf after save as Microsoft Word 2007 dialog


Create or edit Form dialog part I


Create or Edit Form dialog part I


Create or edit Form dialog part II


Create or Edit Form dialog part II


View Adobe Acrobat Pro X Form. View Adobe Acrobat Pro X Form


Save Arcobat Pro X Form. Save Arcobat Pro X Form


In paragraf field 3 text fragment ... View Adobe file


Plan C ...



foo.cmd -xml xslfoRef.xml -xsl xml2pdf.xsl -pdf xslfoRef.pdf

Apache FOP create TrueType Font Metrics:


java -cp build/fop.jar;lib\xmlgraphics-commons-1.4.jar;lib\commons-io-1.3.1.jar;lib\commons-logging-1.0.4.jar;lib/serializer-2.7.0.jar org.apache.fop.fonts.apps.TTFReader -ttcname "Cambria" %windir%\Fonts\CAMBRIA.TTC Cambria2.xml

Apache FOP create pdf include font Cambria:


fop.bat -c Cambria2.xml  -xml xslfoRef.xml -xsl xml2pdf.xsl -pdf xslfoRef.pdf


New Form in Adobe LiveCycle Designer New Form in Adobe LiveCycle Designer


Use balnk form Use balnk form


set orientation set orientation


add view XML add view XML


add subform, text and form field add subform, text and form field


Text not edit in Acrobar X Pro! text not edit in Acrobar X Pro


Edit form field in Adobe X Edit field in Adobe X



TBD: XSLT_1, XSLT_2 - style text


Text template -


textempl.txt:


Full Name:
Company:
Job Title:
e-mail:
Phone:
Descriptions:\While \this text is bold\, this text will not be bold

getxtxml.xml:


]>
&textempltxt;

XML HTML template -


HTeMpLate.xml:






























Full Name:
Company:
Job Title:
e-mail:
Phone:
Descriptions:
While
this text is bold
, this text will not be bold



XML CSS file,


xstyle.xss:


@charset "UTF-8"; /* for Chrome Old ver */
/* test @: FireFox 18.0.1, Safari 5.1.7,Opera 12.12, Chrome 23.- 24., Internet Explorer 8 */
/* Style Sheets with XML */
body { display: block; width: 800px; align=left; border-width:0px; float:top; margin: 0; padding: 0;
border: 0; outline: 0; vertical-align: baseline; background: transparent;}

table { display: table; width: 800px; align=right; float:top;
border-spacing:10px; /* FF18,Sf5,Op12,Ch24 eq IE8 margin-bottom: 10px; */
}

tr { display: table-row; width: 800px; float:top; margin-bottom:10px; }
td { display: table-cell; width: 400px; padding-left : 10px; padding-right: 10px; border-color: 1px solid #0070C0; text-align: right; float:top; }

td.field-style { display: table-cell; width: 400px; padding-left: 10px; padding-right: 10px; text-align : right; }
td.description { display: table-cell; width: 400px; padding-left: 10px; padding-right: 10px; text-align : left ; background-color: #FFFFE5;}
td.adobe-style { display: table-cell; width: 400px; padding-left: 10px; padding-right: 10px; text-align : left ; border: 1px solid #0070C0;}

font.Red { color: #FF0000; }
font.dkGray { color: #595959; font-weight: bold;}
font.None { color: #000000; }

/* CSS3 FF18,Sf5,Op12,Ch24 */

tr > td[class="field-style"] { display: table-cell; width: 400px; padding-left: 10px; padding-right: 10px; text-align: right; }
tr > td[class="adobe-style"] { display: table-cell; width: 400px; padding-left: 10px; padding-right: 10px; text-align: left; border: 1px solid #0070C0;}
tr > td[class="description"] { display: table-cell; width: 400px; padding-left: 10px; padding-right: 10px; text-align: left; background-color: #FFFFE5;}

td > font[class="Red" ] { color: #FF0000; }
td > font[class="dkGray"] { color: #595959; font-weight: bold;}
td > font[class="None" ] { color: #000000; }

Convert HTeMpLate.xml - HTML template to Word XML 2003/ WordML template.


xml2wordml.cmd:


@echo off
msxsl.exe HTeMpLate.xml xml2wordml.xslt -o wordml2003.xml

xml2wordml.xslt:


    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xml:space="preserve">



progid="Word.Document"



















































































































Save documents open in 2007 Word SP3 as PDF, powershell script.


powershell .\word2pdf.ps1

word2pdf.ps1:


# word2pdf.ps1 STTR sttrus@mail.ru
[int]$wdFormatPDF = 17
$SaveAsFormat = [int]$wdFormatPDF
$SaveAsExt=".pdf"
$word = New-Object -ComObject word.application
$word.visible = $false
$SourceDir="C:\DocSourceDir"
$i =0
$Files = Get-ChildItem $SourceDir -recurse -include *.txt,*.doc,*.docx,*.rtf,*.xml
Foreach ($file in $Files) {
$doc = $word.documents.open($file.fullname)
$saveFile=$file.DirectoryName + '\' + $file.BaseName + $SaveAsExt
$doc.saveas($saveFile, $SaveAsFormat)
$doc.close()
$i++
}
$word.Quit()
$word = $null
[gc]::collect()
[gc]::WaitForPendingFinalizers()
write-host "Count : $i"

Save documents open in 2007 Word SP3 as PDF, WSH script:


cscript //Nologo doc2pdf.vbs wordml2003.xml

doc2pdf.vbs:


If WScript.Arguments.Count <1 then 
Wscript.Echo "Ex.1: cscript //Nologo doc2pdf.vbs filename.ext"
Wscript.Echo "Ex.2: cscript //Nologo doc2pdf.vbs wordml2003.xml"
Wscript.Quit
End If

Dim strFilePath:strFilePath = WScript.Arguments.Item(0)

docx2pdf strFilePath

Sub docx2pdf(OpenFile)
Const wdFormatPDF = 17

Dim WordDocument, FileProperties, strOpenFileName, strSavePDF

Dim FSO:Set FSO = CreateObject("Scripting.FileSystemObject")

If FSO.FileExists(OpenFile) Then

Dim WordApplication:Set WordApplication = CreateObject("Word.Application")

WordApplication.Visible = False
Set FileProperties = FSO.GetFile(OpenFile)
strOpenFileName = FileProperties.Path

Else
WScript.Echo "File Open Error: file not exist!"
Exit Sub
End If

strSavePDF = FSO.BuildPath(FileProperties.ParentFolder, FSO.GetBaseName(FileProperties) & ".pdf")
WordApplication.Documents.Open strOpenFileName
Set WordDocument = WordApplication.ActiveDocument
WordDocument.SaveAs strSavePDF, wdFormatPDF
WordDocument.Close
WordApplication.Quit(False)
End Sub

Comments

Popular Posts

keyboard - Is there any utility/method to change Windows key bindings to type rare chars to currently empty bindings?

I'm currently typing this post with my windows XP machine and (Spanish) keyboard, and I'd like to add some extra symbols to my text. I could open the "char map" windows utility, look for the desired symbols, and paste them. But I'd like something quickier. For example, when I'm using my OSX Mac at work, I can easily add a ©, ™, ® or similar symbols, just pressing some weird ALT-GR + G / H / J, key combinations. In my (Spanish) keyboard mapping, these combinations are empty, as they don't produce any char at all, which, on the other hand, is perfectly normal and desirable. So, I thought: Why couldn't I add some extra key mappings on top of my currently empty ALT-GR + G/J/H Keys in my Spanish keyboard, and thus, being able to quickly type these special symbols? So that's my question: Is there any utility/method to achieve that effect under windows? (My version is XP). I've even googled this for some time but no luck. I've been a long term Hot...

How do I transmit a single hexadecimal value serial data in PuTTY using an Alt code?

I am trying to sent a specific hexadecimal value across a serial COM port using PuTTY. Specifically, I want to send the hex codes 9C, B6, FC, and 8B. I have looked up the Alt codes for these and they are 156, 182, 252, and 139 respectively. However, whenever I input the Alt codes, a preceding hex value of C2 is sent before 9C, B6, and 8B so the values that are sent are C2 9C, C2 B6, and C2 8B. The value for FC is changed to C3 FC. Why are these values being placed before the hex value and why is FC being changed altogether? To me, it seems like there is a problem internally converting the Alt code to hex. Is there a way to directly input hex values without using Alt codes in PuTTY? Answer What you're seeing is just ordinary text character set conversion. As far as PuTTY is concerned, you are typing (and reading) text , not raw binary data, therefore it has to convert the text to bytes in whatever configured character set before sending it over the wire. In other words, when y...

linux - Extract/save a mail attachment using bash

Using normal bash tools (ie, built-ins or commonly-available command-line tools), is it possible, and how to extract/save attachments on emails? For example, say I have a nightly report which arrives via email but is a zip archive of several log files. I want to save all those zips into a backup directory. How would I accomplish that? Answer If you're aiming for portability, beware that there are several different versions of mail(1) and mailx(1) . There's a POSIX mailx command, but with very few requirements. And none of the implementations I have seem to parse attachments anyway. You might have the mpack package . Its munpack command saves all parts of a MIME message into separate files, then all you have to do is save the interesting parts and clean up the rest. There's also metamail . An equivalent of munpack is metamail -wy .

Desktop reboots itself on sleep or hibernate

I have been using an ASUS M2NPV-VM motherboard for main home desktop workstation, operating Windows Vista x64. This computer has right from day one not been able to enter hibernate or standby; after Windows performs its final actions and brings the machine down, it would automatically revive itself for a reboot. Updating to the second latest BIOS (1201)has not helped (the latest BIOS revision would induce video refresh problems rendering it unusable). I have been reading related discussions on incidents similar to mine to no avail of a true workable solution. They appear to be more speculative guesses rather than actual knowledge on the inner workings of motherboard hardware. Does anybody have any electronic engineering experience on PC energy-saving standards to provide a more informed opinion how to go about getting this to work? More stories: this motherboard could not even reboot properly the first thing i used it. It was due to refresh rate of the onboard GPU, which had no influe...