从MikTex(通过Pandoc)写出表格字段,iTextSharp可以解析

问题描述 投票:0回答:1

我正在与iTextSharp进行一些测试,看它能够自动化我的工作流程。所以,我正在使用Pandocpdf生成一些markdowns。但是当我生成文件时,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{}
itext latex pandoc miktex
1个回答
1
投票

我想我需要它周围的表单包装器:

\begin{Form}

My field: \underline{\TextField[name=AField]{}}

\end{Form}
© www.soinside.com 2019 - 2024. All rights reserved.