convert pdf to image in c#.net : Change pdf security settings reader application SDK tool html wpf asp.net online minted3-part1002

• The
kvoptions
package is now required. It is needed to process key-
value package options, such as the new
cachedir
option.
• Manysmallimprovements,includingbetterhandlingofpathsunder
Windows and improved key system.
v2.0-alpha2 (2013/08/21)
\DeleteFile
now only deletes files if they do indeed exist. This elimi-
nates warning messages due to missing files.
• Fixedabuginthedefinitionof
\DeleteFile
for non-Windows systems.
• Added support for Pygments option
stripnl
.
• Settingsmacrosthatwerepreviouslydefinedgloballyarenowdefinedlo-
cally,sothat
\setminted
maybe confined by
\begingroup...\endgroup
as expected.
• Macrodefinitionsforagivenstylearenowloadedonlyonceperdocu-
ment, rather than once per command/environment. This works even
without caching.
• Acustomscript/executablemaynowbesubstitutedfor
pygmentize
by redefining
\MintedPygmentize
.
v2.0alpha (2013/07/30)
• Added the package option
cache
. This significantly increases com-
pilation speed by caching old output. For example, compiling the
documentation is around 5x faster.
• Newinlinecommand
\mintinline
. Custom versions can be created
via
\newmintinline
.The command works inside other commands (for
example, footnotes) in most situations, so long as the percent and hash
characters are avoided.
• Thenew
\setminted
command allows options to be specified at the
document and language levels.
• Allextendedcharacters(Unicode,etc.) supportedby
inputenc
now
work under the pdfTeX engine. This involved using
\detokenize
on
everything prior to saving.
• Newpackage option
langlinenos
allows line numbering to pick up
where it left off for a given language when
firstnumber=last
.
• Newoptions,including
style
,
encoding
,
outencoding
,
codetagify
,
keywordcase
,
texcomments
(same as
texcl
),
python3
(for the
PythonConsoleLexer
), and
numbers
.
\usemintedstyle
now takes an optional argument to specify the style
for a particular language, and works anywhere in the document.
xcolor
is only loaded if
color
isn’t, preventing potential package
clashes.
31
Change pdf security settings reader - C# PDF Digital Signature Library: add, remove, update PDF digital signatures in C#.net, ASP.NET, MVC, WPF
Help to Improve the Security of Your PDF File by Adding Digital Signatures
convert locked pdf to word online; copy paste encrypted pdf
Change pdf security settings reader - VB.NET PDF Digital Signature Library: add, remove, update PDF digital signatures in vb.net, ASP.NET, MVC, WPF
Guide VB.NET Programmers to Improve the Security of Your PDF File by Adding Digital Signatures
pdf file security; decrypt pdf file online
1.7 (2011/09/17)
• Options for float placement added [2011/09/12]
• Fixed
tabsize
option [2011/08/30]
• More robust detection of the
-shell-escape
option [2011/01/21]
• Added the
label
option [2011/01/04]
• Installation instructions added [2010/03/16]
• Minimal working example added [2010/03/16]
• Added PHP-specific options [2010/03/14]
• Removed unportable flag from Unix shell command [2010/02/16]
1.6 (2010/01/31)
• Added font-related options [2010/01/27]
• Windows support added [2010/01/27]
• Added command shortcuts [2010/01/22]
• Simpler versioning scheme [2010/01/22]
0.1.5 (2010/01/13)
• Added
fillcolor
option [2010/01/10]
• Added float support [2010/01/10]
• Fixed
firstnumber
option [2010/01/10]
• Removed
caption
option [2010/01/10]
0.0.4 (2010/01/08)
• Initial version [2010/01/08]
9 Implementation
9.1 Required packages
Load required packages. For compatibility reasons, most old functionality should
be supported with the original set of packages. More recently added packages, such
as
etoolbox
and
xstring
,should only be used for new features when possible.
\RequirePackage{keyval}
\RequirePackage{kvoptions}
\RequirePackage{fancyvrb}
\RequirePackage{float}
\RequirePackage{ifthen}
\RequirePackage{calc}
32
VB.NET PDF Password Library: add, remove, edit PDF file password
RasterEdge XDoc.PDF SDK provides some PDF security settings about password to help protect your PDF document Add password to PDF. Change PDF original password.
decrypt pdf with password; convert locked pdf to word doc
C# PDF Password Library: add, remove, edit PDF file password in C#
Able to change password on adobe PDF document in C#.NET. To help protect your PDF document in C# project, XDoc.PDF provides some PDF security settings.
decrypt password protected pdf; convert secure webpage to pdf
\RequirePackage{ifplatform}
\RequirePackage{pdftexcmds}
\RequirePackage{etoolbox}

\RequirePackage{xstring}

\RequirePackage{lineno}
Make sure that either
color
or
xcolor
is loaded by the beginning of the document.

\AtBeginDocument{%

\@ifpackageloaded{color}{}{%

\@ifpackageloaded{xcolor}{}{\RequirePackage{xcolor}}}%

}
9.2 Package options
\minted@float@within
Define an option that controls the section numbering of the
listing
float.

\DeclareVoidOption{chapter}{\def\minted@float@within{chapter}}

\DeclareVoidOption{section}{\def\minted@float@within{section}}
newfloat
Define an option to use newfloat rather than float to create a floated
listing
environment.

\DeclareBoolOption{newfloat}
cache
Define an option that determines whether highlighted content is cached. We use a
boolean to keep track of its state.

\DeclareBoolOption[true]{cache}
\minted@jobname
At various points, temporary files and directories will need to be named after
the main
.tex
file. The typical way to do this is to use
\jobname
. However,
if the file name contains spaces, then
\jobname
will contain the name wrapped
in quotes (older versions of MiKTeX replace spaces with asterisks instead, and
XeTeX
apparentlyallowsdoublequoteswithinfilenames, in which case names are
wrapped in single quotes). While that is perfectly fine for working with L
A
T
E
X
internally, it causes problems with
\write18
,since quotes will end up in unwanted
locations in shell commands. It would be possible to strip the wrapping quotation
marks when they are present, and maintain any spaces in the file name. But it is
simplest to create a “sanitized” version of
\jobname
in which spaces and asterisks
are replaced by underscores, and double quotes are stripped.

\StrSubstitute{\jobname}{ }{_}[\minted@jobname]

\StrSubstitute{\minted@jobname}{
*
}{_}[\minted@jobname]

\StrSubstitute{\minted@jobname}{"}{}[\minted@jobname]
33
VB.NET PDF Library SDK to view, edit, convert, process PDF file
PDF Document Protection. XDoc.PDF SDK allows users to perform PDF document security settings in VB.NET program. Password, digital
pdf security options; change pdf document security
C# HTML5 Viewer: Deployment on AzureCloudService
RasterEdge.XDoc.PDF.HTML5Editor.dll. system.webServer> <validation validateIntegratedModeConfiguration="false"/> <security> <requestFiltering
create pdf security; convert secure webpage to pdf
\minted@cachedir
Set the directory in which cached content is saved. The default uses a
minted-
prefix followed by the sanitized
\minted@jobname
.

\newcommand{\minted@cachedir}{\detokenize{_}minted-\minted@jobname}

\let\minted@cachedir@windows\minted@cachedir

\define@key{minted}{cachedir}{%

\@namedef{minted@cachedir}{#1}%

\StrSubstitute{\minted@cachedir}{/}{\@backslashchar}[\minted@cachedir@windows]}
\minted@outputdir
The
-output-directory
command-line option for L
A
T
E
X causes problems for
minted, because the minted temporary files are saved in the output directory,
but minted still looks for them in the document root directory. There is no way
to access the value of the command-line option. But it is possible to allow the
output directory to be specified manually as a package option. A trailing slash is
automatically appended to the
outputdir
,so that it may be directly joined to
cachedir
. This may be redundant if the user-supplied value already ends with
aslash, but doubled slashes are ignored under *nix and Windows, so it isn’t a
problem.

\let\minted@outputdir\@empty

\let\minted@outputdir@windows\@empty

\define@key{minted}{outputdir}{%

\@namedef{minted@outputdir}{#1/}%

\StrSubstitute{\minted@outputdir}{/}%

{\@backslashchar}[\minted@outputdir@windows]}
kpsewhich
Define an option that invokes
kpsewhich
to locate the files that are to be
pygmentize
d. This isn’t done by default to avoid the extra overhead, but can be
useful with some build tools such as
texi2pdf
that rely on modifying
TEXINPUTS
.

\DeclareBoolOption{kpsewhich}
langlinenos
Define an option that makes all
minted
environments and
\mint
commands for a
given language share cumulative line numbering (if
firstnumber=last
).

\DeclareBoolOption{langlinenos}
draft
Define an option that allows fancyvrb to do all typesetting directly, without using
Pygments. This trades syntax highlighting for speed. Note that in many cases, the
difference in performance between caching and draft mode will be minimal. Also
note that draft settings may be inherited from the document class.

\DeclareBoolOption{draft}
final
Define a
final
option that is the opposite of
draft
,since many packages do this.

\DeclareComplementaryOption{final}{draft}
34
C# HTML5 Viewer: Deployment on ASP.NET MVC
RasterEdge.XDoc.PDF.HTML5Editor.dll. system.webServer> <validation validateIntegratedModeConfiguration="false"/> <security> <requestFiltering
pdf secure signature; decrypt pdf without password
C# Imaging - Decode Code 93 Barcode in C#.NET
the purpose to provide a higher density and data security enhancement to Load an image or a document(PDF, TIFF, Word, Excel Set the barcode reader settings.
change security on pdf; create secure pdf
Process package options. Proceed with everything that immediately relies upon
them. If PGF/TikZ externalization is in use, switch on
draft
mode and turn
off
cache
.Externalization involves compiling the entire document; all parts not
related to the current image are “silently thrown away.” minted needs to cooperate
with that by not writing any temp files or creating any directories.

\ProcessKeyvalOptions
*

\ifthenelse{\boolean{minted@newfloat}}{\RequirePackage{newfloat}}{}

\ifcsname tikzexternalrealjob\endcsname

\minted@drafttrue

\minted@cachefalse

\else

\fi

\ifthenelse{\boolean{minted@cache}}{%

\AtEndOfPackage{\ProvideDirectory{\minted@outputdir\minted@cachedir}}}{}
9.3 Input, caching, and temp files
\minted@input
We need a wrapper for
\input
. In most cases,
\input
failure will be due to
attempts to use
\inputminted
with files that don’t exist, but we also want to give
informative error messages when
outputdir
is needed or incompatible build tools
are used.

\newcommand{\minted@input}[1]{%

\IfFileExists{#1}%

{\input{#1}}%

{\PackageError{minted}{Missing Pygments output; \string\inputminted\space

was^^Jprobably given a file that does not exist--otherwise, you may need

^^Jthe outputdir package option, or may be using an incompatible build

tool\ifwindows,^^Jor may be using the kpsewhich option without having

PowerShell installed\fi}%

{This could be caused by using -output-directory or -aux-directory

^^Jwithout setting minted’s outputdir, or by using a build tool that

^^Jchanges paths in ways minted cannot detect\ifwindows, or by using the

^^Jkpsewhich option without PowerShell\fi.}}%

}
\minted@infile
Define a default name for files of highlighted content that are brought it. Caching
will redefine this. We start out with the default, non-caching value.

\newcommand{\minted@infile}{\minted@jobname.out.pyg}
We need a way to track the cache files that are created, and delete those that
are not in use. This is accomplished by creating a comma-delimited list of cache
files and saving this list to the
.aux
file so that it may be accessed on subsequent
runs. During subsequent runs, this list is compared against the cache files that
are actually used, and unused files are deleted. Cache file names are created with
35
C# Image: C# Code to Upload TIFF File to Remote Database by Using
Website project and select WSE Settings 3.0. using System.Security.Cryptography; private void tsbUpload_Click & profession imaging controls, PDF document, image
decrypt a pdf file online; pdf security password
VB Imaging - VB Codabar Generator
check digit function for user's security consideration. also creates Codabar bar code on PDF, WORD, TIFF Able to adjust parameter settings before encoding, like
pdf unlock; change security settings on pdf
MD5 hashes of highlighting settings and file contents, with a
.pygtex
extension, so
they never contain commas. Thus comma-delimiting the list of file names doesn’t
introduce a potential for errors.
\minted@cachelist
This is a list of the current cache files.

\newcommand{\minted@cachelist}{}
\minted@addcachefile
This adds a file to the list of cache files. It also creates a macro involving the hash,
so that the current usage of the hash can be easily checked by seeing if the macro
exists. The list of cache files must be created with built-in linebreaks, so that when
it is written to the
.aux
file, it won’t all be on one line and thereby risk buffer
errors.

\newcommand{\minted@addcachefile}[1]{%

\expandafter\long\expandafter\gdef\expandafter\minted@cachelist\expandafter{%

\minted@cachelist,^^J%

\space\space#1}%

\expandafter\gdef\csname minted@cached@#1\endcsname{}%

}
\minted@savecachelist
We need to be able to save the list of cache files to the
.aux
file, so that we can
reload it on the next run.

\newcommand{\minted@savecachelist}{%

\ifdefempty{\minted@cachelist}{}{%

\immediate\write\@mainaux{%

\string\gdef\string\minted@oldcachelist\string{%

\minted@cachelist\string}}%

}%

}
\minted@cleancache
Clean up old cache files that are no longer in use.

\newcommand{\minted@cleancache}{%

\ifcsname minted@oldcachelist\endcsname

\def\do##1{%

\ifthenelse{\equal{##1}{}}{}{%

\ifcsname minted@cached@##1\endcsname\else

\DeleteFile[\minted@outputdir\minted@cachedir]{##1}%

\fi

}%

}%

\expandafter\docsvlist\expandafter{\minted@oldcachelist}%

\else

\fi

}
36
At the end of the document, save the list of cache files and clean the cache. If
in draft mode, don’t clean up the cache and save the old cache file list for next
time. This allows draft mode to be switched on and off without requiring that all
highlighted content be regenerated. The saving and cleaning operations may be
called without conditionals, since their definitions already contain all necessary
checks for their correct operation.

\ifthenelse{\boolean{minted@draft}}%

{\AtEndDocument{%

\ifcsname minted@oldcachelist\endcsname

\let\minted@cachelist\minted@oldcachelist

\minted@savecachelist

\fi}}%

{\AtEndDocument{%

\minted@savecachelist

\minted@cleancache}}%
9.4 OS interaction
We need system-dependent macros for communicating with the “outside world.”
\DeleteFile
Delete a file. Define conditionally in case an equivalent macro has already been
defined.

\ifwindows

\providecommand{\DeleteFile}[2][]{%

\ifthenelse{\equal{#1}{}}%

{\IfFileExists{#2}{\immediate\write18{del "#2"}}{}}%

{\IfFileExists{#1/#2}{%

\StrSubstitute{#1}{/}{\@backslashchar}[\minted@windir]

\immediate\write18{del "\minted@windir\@backslashchar #2"}}{}}}

\else

\providecommand{\DeleteFile}[2][]{%

\ifthenelse{\equal{#1}{}}%

{\IfFileExists{#2}{\immediate\write18{rm "#2"}}{}}%

{\IfFileExists{#1/#2}{\immediate\write18{rm "#1/#2"}}{}}}

\fi
\ProvideDirectory
We need to be able to create a directory, if it doesn’t already exist. This is primarily
for storing cached highlighted content.

\ifwindows

\newcommand{\ProvideDirectory}[1]{%

\StrSubstitute{#1}{/}{\@backslashchar}[\minted@windir]

\immediate\write18{if not exist "\minted@windir" mkdir "\minted@windir"}}

\else

\newcommand{\ProvideDirectory}[1]{%
37

\immediate\write18{mkdir -p "#1"}}

\fi
\TestAppExists
Determine whether a given application exists.
Usage is a bit roundabout, but has been retained for backward compatibil-
ity. At some point, it may be worth replacing this with something using
\@@input"|<command>"
.That would require MiKTeX users to
--enable-pipes
,
however, which would make things a little more complicated. If Windows XP
compatibility is ever no longer required, the
where
command could be used instead
of the approach for Windows.
To test whether an application exists, use the following code:
\TestAppExists{appname}
\ifthenelse{\boolean{AppExists}}{app exists}{app doesn't exist}

\newboolean{AppExists}

\newread\minted@appexistsfile

\newcommand{\TestAppExists}[1]{

\ifwindows
On Windows, we need to use path expansion and write the result to a file. If the
application doesn’t exist, the file will be empty (except for a newline); otherwise,
it will contain the full path of the application.

\DeleteFile{\minted@jobname.aex}

\immediate\write18{for \string^\@percentchar i in (#1.exe #1.bat #1.cmd)

do set >"\minted@jobname.aex" <nul: /p

x=\string^\@percentchar \string~$PATH:i>>"\minted@jobname.aex"}

%$ <- balance syntax highlighting

\immediate\openin\minted@appexistsfile\minted@jobname.aex

\expandafter\def\expandafter\@tmp@cr\expandafter{\the\endlinechar}

\endlinechar=-1\relax

\readline\minted@appexistsfile to \minted@apppathifexists

\endlinechar=\@tmp@cr

\ifthenelse{\equal{\minted@apppathifexists}{}}

{\AppExistsfalse}

{\AppExiststrue}

\immediate\closein\minted@appexistsfile

\DeleteFile{\minted@jobname.aex}

\else
On Unix-like systems, we do a straightforward
which
test and create a file upon
success, whose existence we can then check.

\immediate\write18{which "#1" && touch "\minted@jobname.aex"}

\IfFileExists{\minted@jobname.aex}

{\AppExiststrue
38

\DeleteFile{\minted@jobname.aex}}

{\AppExistsfalse}

\fi

}
9.5 Option processing
Option processing is somewhat involved, because we want to be able to define
options at various levels of hierarchy: individual command/environment, language,
global (document). And once those options are defined, we need to go through
the hierarchy in a defined order of precedence to determine which option to apply.
As if that wasn’t complicated enough, some options need to be sent to Pygments,
some need to be sent to fancyvrb, and some need to be processed within minted
itself.
To begin with, we need macros for storing lists of options that will later be passed
via the command line to Pygments (
optlistcl
). These are defined at the global
(
cl@g
), language (
cl@lang
), and command or environment (
cl@cmd
)levels, so
that settings can be specified at various levels of hierarchy. The language macro is
actually a placeholder. The current language will be tracked using
\minted@lang
.
Each individual language will create a
\minted@optlistcl@lang
languagemacro.
\minted@optlistcl@lang
may be
\let
to this macro as convenient; otherwise,
the general language macro merely serves as a placeholder.
The global- and language-level lists also have an
inline
(
i
)variant. This allows
different settings to be applied in inline settings. An inline variant is not needed at
the command/environment level, since at that level settings would not be present
unless they were supposed to be applied.
\minted@optlistcl@g

\newcommand{\minted@optlistcl@g}{}
\minted@optlistcl@g@i

\newcommand{\minted@optlistcl@g@i}{}
\minted@lang

\let\minted@lang\@empty
\minted@optlistcl@lang

\newcommand{\minted@optlistcl@lang}{}
\minted@optlistcl@lang@i

\newcommand{\minted@optlistcl@lang@i}{}
39
\minted@optlistcl@cmd

\newcommand{\minted@optlistcl@cmd}{}
We also need macros for storing lists of options that will later be passed to fancyvrb
(
optlistfv
). As before, these exist at the global (
fv@g
), language (
fv@lang
),
and command or environment (
fv@cmd
)levels. Pygments accepts fancyvrb options,
but in almost all cases, these options may be applied via
\fvset
rather than via
running Pygments. This is significantly more efficient when caching is turned on,
since it allows formatting changes to be applied without having to re-highlight the
code.
\minted@optlistfv@g

\newcommand{\minted@optlistfv@g}{}
\minted@optlistfv@g@i

\newcommand{\minted@optlistfv@g@i}{}
\minted@optlistfv@lang

\newcommand{\minted@optlistfv@lang}{}
\minted@optlistfv@lang@i

\newcommand{\minted@optlistfv@lang@i}{}
\minted@optlistfv@cmd

\newcommand{\minted@optlistfv@cmd}{}
\minted@configlang
We need a way to check whether a language has had all its option list macros
created. This generally occurs in a context where
\minted@lang
needs to be set.
So we create a macro that does both at once. If the language list macros do not
exist, we create them globally to simplify future operations.

\newcommand{\minted@configlang}[1]{%

\def\minted@lang{#1}%

\ifcsname minted@optlistcl@lang\minted@lang\endcsname\else

\expandafter\gdef\csname minted@optlistcl@lang\minted@lang\endcsname{}%

\fi

\ifcsname minted@optlistcl@lang\minted@lang @i\endcsname\else

\expandafter\gdef\csname minted@optlistcl@lang\minted@lang @i\endcsname{}%

\fi

\ifcsname minted@optlistfv@lang\minted@lang\endcsname\else

\expandafter\gdef\csname minted@optlistfv@lang\minted@lang\endcsname{}%
40
Documents you may be interested
Documents you may be interested