我正在做一些测试,iTextSharp
看看它是否可以自动化我拥有的工作流程。所以,我Pandoc
用来pdf
从markdown
. 但是当我生成文件时iTextSharp
无法识别我生成的字段。它可以识别我没有创建的不同字段,pdf
所以我认为这是我做错了。
解决方案:
我想我需要围绕它的表单包装器:
\begin{Form}
My field: \underline{\TextField[name=AField]{}}
\end{Form}
因此,我从以下代码开始Test.md
:
My field: \underline{\TextField[name=AField]{}}
如果我使用此命令pandoc -s .\Test.md -o Test.tex
生成tex
文件,我会得到以下结果:
... see pre code below if this part of the latex file matter to you
\begin{document}
My field: \underline{\TextField[name=AField]{}}
\end{document}
当然,我使用这个命令pandoc -s .\Test.md -o Test.pdf
来实际生成pdf
. 我应该使用不同的命令来生成TextField
吗?
tex
为简洁起见,在上面未包含的文件中生成的代码:
\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provides euro and other symbols
\else % if luatex or xelatex
\usepackage{unicode-math}
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\usepackage{hyperref}
\hypersetup{
pdfborder={0 0 0},
breaklinks=true}
\urlstyle{same} % don't use monospace font for urls
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
% set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\date{}