adobe pdf library c# : Exporting pdf form to excel control application system azure web page wpf console pdfPfDpc070k_0-part1902

Some T
E
X
MACS
Image Inclusion Considerations
by David E. Miller
Email: david.miller@quaoar.us
Web: mathboxvm.org
15May 2013
The author is David E. Miller. He is a graduate of the University of Cincinnati witha BSdegree
inAerospaceEngineeringandagraduateof The Ohio State University withanMSdegreeinSystems
Engineering. Helives inPickerington, Ohio.
Abstract
Thisarticleelaboratesontheissuesinvolvedwiththeinclusion(insertingorlinking)ofimageswithin
aT
E
X
MACS
document. Itincludesarecommendedwork-flowforthe e inclusionofimages(orgraphics)
ofvariousformatsthatcircumventsthecomplicationsandidiosyncrasiesinherentwithT
E
X
MACS
image
inclusion.Includedaresomesuggestedhelpertoolsandinformationrelatedtoimagesandformats.This
article isnota comprehensive treatment of all l aspectsofT
E
X
MACS
image inclusion. Commentsand
recommendationsarewelcome.
This workis licensedunder theCreative Commons Attribution-Noncommercial3.0UnportedLicense. To
viewacopyof this license, visit
http://creativecommons.org/licenses/by-nc/3.0/
or sendaletter to
CreativeCommons,171SecondStreet, Suite 300,SanFrancisco,California,94105,USA.
Attributedquotationsfrom copyrightedworksmayappearinthisdocumentunderthe“fairuse”provision
ofSection107oftheUnitedStatesCopyrightAct(Title17oftheUnitedStatesCode).Thelicenseofthis
document is notapplicableto thosequotations.
1
Exporting pdf form to excel - extract form data from PDF in C#.net, ASP.NET, MVC, Ajax, WPF
Help to Read and Extract Field Data from PDF with a Convenient C# Solution
how to save filled out pdf form in reader; can reader edit pdf forms
Exporting pdf form to excel - VB.NET PDF Form Data Read library: extract form data from PDF in vb.net, ASP.NET, MVC, Ajax, WPF
Convenient VB.NET Solution to Read and Extract Field Data from PDF
change font size pdf form reader; extract data from pdf into excel
1 Introduction
Thisarticle consistsofanelaborationofnotes madewhileinvestigatingthemeans usedbyT
E
X
MACS
for
insertingimages.Thesenotesarenotacomprehensivetreatmentofalltheissuesthatmaybeinvolvedwith
the generalsubject of images andformats,or the specifics ofthetechnicalmatterofinsertionofimages for
inclusionwithinT
E
X
MACS
documents.Thisauthorwasinterestedinincludingimagescreatedbyorexported
from other software tools. Inparticular, the images exported from Geogebra andgnuplot (which may
have beencreatedusingtheMaximaplot2d functionor thedrawpackages were of interest. Inthecaseof
Maxima,imagesmightalsohave beencreatedusingaT
E
X
MACS
Maxima sessionas aninterfacebywayof
thebuilt-inplugin. Themeansusedtocreateimagefilesisactuallyirrelevanttothegeneraltechnicalpoints
made inthis article. However, this informationis referencedfor the sake of providing the reader withthe
details ofthemotivatingcontext whichmay beimportant tosome.
2 Points of Emphasis
Thereareissuesinvolvedwiththeinclusion(linkingorinserting)ofimagesinaT
E
X
MACS
document. The
followinglist is asummaryofsomesignificantpointsfor emphasis:
• T
E
X
MACS
hastwoprimarymeansforincludingimages—linking andinsertion.Byinsertinganimage
file,theimagebecomesanintegralpartoftheT
E
X
MACS
document. Subsequent changes totheimage
file do not affect the inserted image content. A linked image is a reference to the image file itself
whichisnot part oftheT
E
X
MACS
document. Subsequentchangestothereferencedimagefileshould
bereflectedby theimagecontent of theT
E
X
MACS
document.
• T
E
X
MACS
converts image content to PostScript format regardless of the format of the image file
itself.Thisisaccomplishedby“helper”programsexternaltoT
E
X
MACS
.Theparticularhelperprogram
usedvaries according tothe image format. Obviously the required programs must be accessible on
the systeminuse.
• While it is possible, within the limitations of the available helper programs, to convert and insert
images of various supported formats using the built-in features of T
E
X
MACS
,this is not necessarily
the best way, in general, to accomplish image inclusion. This author recommends that images be
createdas or convertedtoPDFfiles,convertedtoEncapsulated PostScript (EPS)format,and
then inserted into or linkedtotheT
E
X
MACS
document. There are manytools availablefor creating
PDFimagefiles or for convertingother image formatstoPDFformat. Geogebra exports toPDF
directly,andgnuplot(orMaximausinggnuplot)hasthepdfcairoterminalusedtocreatePDF
imagefiles,asexamples.
• PDF files usedas asource for conversionand inclusionwithinaT
E
X
MACS
document shouldfirst be
createdwithdimensions(ininches,centimeters,pointsetc.)thatareclosetotheintendeddimensions
oftheimagewithinthe document. T
E
X
MACS
canscaleimagesoflargerdimensions,butiftheactual
dimensions of the images are much larger than the dimensions intended to be used within the
document, the T
E
X
MACS
document file size will be larger than necessary. If this is not an issue
then the PDF image dimensions are not significant — assuming the PDF file has been cropped
ofexcessivewhitespaceasrequired. Imagedimensions smaller thanthat intendedmay not produce
2
Section2
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
PDF Library in C#.NET Class. Best C#.NET PDF to Microsoft Office Word converter SDK for exporting PDF to Word in Visual Studio .NET.
extract pdf data to excel; pdf form data extraction
C# PDF Convert to SVG SDK: Convert PDF to SVG files in C#.net, ASP
without quality loss. C# sample code for quick integration in .NET framework program for exporting PDF from SVG. In some situations
exporting data from pdf to excel; flatten pdf form in reader
acceptableresults ifscaledbyT
E
X
MACS
tolargerdimensions. Linkedimagesalsodonotsignificantly
affect the sizeoftheT
E
X
MACS
document.
• Programsthat create or export imagestoPDFformatmayproduce imagefilesthatareentirepages
(A4,8.5by11inches,etc.)indimensionswiththeimageoftheintendeddimensionsplacedsomewhere
onthe page. These PDFfiles ingeneral must be croppedto removethis unnecessary andexcessive
whitespace. Once croppedthePDF files may beconvertedto EPSforinsertion in,or linkingto,a
T
E
X
MACS
document.
• Imagesthatincludeso-calledtransparency effectsposeuniqueissues. PostScripthaslimitedor no
supportfortransparencyeffects1ofvariousforms —invisiblepixels,opacity,translucency,etc. PDF
imageswithtransparencymustberasterized inordertodisplayasintended.Thishasimplicationsfor
sourceimagedimensions,resolution,andfilesize.RasterizedPDFfilesintheformofEPScreatedto
accommodatetransparencyeffectscanbemuchlargerthanthe sourcePDFfile—typically20times
larger or more depending ontheresolutionusedinthe conversiontoEPS.
• PostScriptimages insertedinorlinkedtoT
E
X
MACS
mayappeartorender withpoorquality when
viewedusingtheT
E
X
MACS
programitself. This is not somethingthat shouldworry theuser. Images
shouldrender as expectedif the documentis exportedto PDF— or printed.
• T
E
X
MACS
documentsintendedforexporttoPDFwilleitherbeintendedforprinting orfordisplay,or
perhaps both. T
E
X
MACS
documentsexportedtoPDFintendedforprintingmayrequirehigherimage
resolutions whenconvertingPDFimagefiles toEPSfor inclusion.
• T
E
X
MACS
documents that include a large number of EPS images of rasterized PDF files with
transparency effects may result in very large file sizes ifthese images are inserted insteadof linked.
Inthese cases linkingimages isrecommended. Notethat adocumentexportedbyT
E
X
MACS
as PDF
willresult inaPDFfile that is significantly smaller insize thanmightbe expectedif the document
involves large EPSimagefile sizes duetoimageinsertionorlinking.
• PDFfilesexportedbyT
E
X
MACS
forprintingmaybe“re-sized”orotherwiseprocessedbyexternaltools
after being exported by T
E
X
MACS
toachieve various results, suchas for display using a browser or
other device. PDFfiles fordisplay purposesdonot require the higher resolutions that printing may
demand. Re-sizingPDFfiles after exportingwithresolutionsnecessaryfor printingcircumventsthe
needto have different versions of images depending onthe intendedpurpose — printing or display.
NoteagainthatresolutionhasasignificanteffectonthefilesizeofEPSimagesconvertedbyrasterizing
PDFfiles withtransparencyeffects.
1. The PostScript language has limited support for full (not “partial”) transparency effects. For more detailed
technical information about PDF and PostScript language support for image transparency effects refer to:
http://en.wikipedia.org/wiki/Transparency_%28graphic%29#Transparency_in_PDF
PointsofEmphasis
3
C# PDF Convert to Text SDK: Convert PDF to txt files in C#.net
Free evaluation library for exporting PDF to Text in both C#.NET WinForms application and ASP.NET WebForms. RasterEdge.XDoc.Excel.dll. RasterEdge.XDoc.PDF.dll.
how to fill out pdf forms in reader; extract data from pdf form fields
C# PDF Convert to Images SDK: Convert PDF to png, gif images in C#
NET. Support exporting PDF to multiple image forms, including Jpg, Png, Bmp, Gif, Tiff, Bitmap, .NET Graphics, and REImage. Support
how to save a pdf form in reader; pdf data extraction to excel
3 Recommended Work-flow For Image Inclusion
Thisauthorrecommendsthefollowingwork-flowfor theinclusion(linkingorinserting)ofimageswithin
T
E
X
MACS
documents:
1. Create, export or otherwiseconvert all images to PDF format using smallest dimensions consistent
withtheintendedsizeintheT
E
X
MACS
document. As examples:
gnuplotusingpdfcairoterminaltoPDFfiles
Maxima plotfunctions ordraw packageto PDFfiles
Geogebra export toPDFfiles
Conversions usinga2ping(discussedbelow)toPDFfiles
Adobe Acrobat— Convert toAbobePDF
2. CropallPDFfiles withimages asrequiredtoremove excessive whitespace using:
pdfcrop <infilename>.pdf <outfilename>.pdf
3. Convert allPDF imagefiles fromPDFtoEPSusing:
pdftops -level3 -eps -r 300 <infilename>.pdf <outfilename>.eps
where-level3 sets thePostScriptlevel and-r 300 sets the resolution— 300 is thedefault.
TheresolutionshouldmatchtheT
E
X
MACS
Printerdpisetting. IftheT
E
X
MACS
filewillbeexported
toPDFtheintendedpurpose(printing,display,orboth)willdeterminetheresolution. Notethat
PDFfiles exportedbyT
E
X
MACS
willlikely haverelatively smaller filesizes comparedtothe
T
E
X
MACS
sourcedocuments withinsertedimages.
4. Link or inserttheEPSimage forinclusionwithintheT
E
X
MACS
document using:
Insert→Image→Small figureor Insert→Image→Largefiguremenuselections.
then
Insert→LinkImage...orInsert→Insertimage...menuselections
Note. Linkingisprobablythebestoptioningeneral.AnexceptionisiftheT
E
X
MACS
documentitself
isbeingdistributed.
5. Scale the image using T
E
X
MACS
Width and Height settings if required. Refer to the T
E
X
MACS
Help
menuselectionfordetails about imagescalingoptions.
6. Use File→Export→Pdf...menuselectiontoexport the T
E
X
MACS
documenttoPDF
7. Use thefollowingcommandtoreducethefilesize of exportedPDFfiles:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=<outfilename>.pdf <infilename>.pdf
PDFSETTINGSoptions are:
• /screen(screen-view-only quality,72dpiimages)
• /ebook(lowquality,150dpi images)
• /printer(highquality,300dpiimages)
• /prepress (highquality,color preserving,300dpi images)
4
Section3
How to C#: Basic SDK Concept of XDoc.PDF for .NET
C# programmers can convert Word, Excel, PowerPoint Tiff Various PDF annotation features can be integrated into deleting, modifying, importing, exporting, and so
extract data from pdf file; export pdf data to excel
VB.NET PDF: Basic SDK Concept of XDoc.PDF
VB.NET programmers can convert Word, Excel, PowerPoint Tiff Various PDF annotation features can be integrated deleting, modifying, importing, exporting, and so
how to type into a pdf form in reader; c# read pdf form fields
• /default(almostidenticalto /screen)
Thus, a single source PDF file exported from a T
E
X
MACS
document with apage dpi setting of 300
or moreand with EPSimages insertedwithresolutions of 300or more may be “re-sized”according
requirements— print ordisplay.
Note. Depending on the PDFSETTINGS option used,the followingmessage may appear whenusing
this command:
GPL Ghostscript 9.06: Set UseCIEColor for UseDeviceIndependentColor to work
properly.
Addingthe followingoptionto the gs commandwillprevent this messagefromappearing:
-dUseCIEColor
Paper sizeselectionoptions:
• -sPAPERSIZE=letter
• -sPAPERSIZE=a4
• -dDEVICEWIDTHPOINTS=w
• -dDEVICEHEIGHTPOINTS=h(point=1/72of aninch)
• -dFIXEDMEDIA(force papersizeover thePostScript definedsize)
Otheroptions:
• -dEmbedAllFonts=true
• -dSubsetFonts=false
• -dFirstPage=pagenumber
• -dLastPage=pagenumber
• -dAutoRotatePages=/PageByPage
• -dAutoRotatePages=/All
• -dAutoRotatePages=/None
• -r1200 (resolutionfor patternfills andfonts convertedtobitmaps)
• -sPDFPassword=password
Note. This above recommendedwork-flowassumes that:
theTeX LiveT
E
Xauxiliaryprograms (texlive-extra-utils) packageisinstalled(pdfcrop)2and
the PDFutilities (poppler-utils)package(basedonPoppler3)is installed(pdftops) and
the Ghostscript package(gs)isinstalled.
4 Converting Other Image Formats To PDF
Converting images to PDF (e.g., PNG, JPG, etc.) may be accomplished by available tools for that
purpose. IftheTeXLiveT
E
Xauxiliary programs(seeNoteabove) andthesam2ppackagesareinstalled,
thenthefollowingmaybeusedtoconvertimage files toPDFfor step1above:
2. Thereisalsoapdfcropproject:http://pdfcrop.sourceforge.net/. Thisisnottheprogramreferencedhere.
3. PopplerisaPDFrenderinglibrarybasedonXpdfPDFviewer
ConvertingOtherImage Formats ToPDF
5
C# Create PDF from images Library to convert Jpeg, png images to
Create PDF from images in both .NET WinForms and ASP.NET application. .NET converter control for exporting high quality PDF from images in C#.NET.
save data in pdf form reader; extract pdf form data to excel
VB.NET PDF - Convert PDF with VB.NET WPF PDF Viewer
Edit Bookmark. Metadata: Edit, Delete Metadata. Form Process. VB.NET Word, VB.NET Excel, VB.NET illustrates some conversion tabs and features for PDF exporting.
extract data from pdf form; export excel to pdf form
a2ping -v --hires <infilename>.[png|jpg|tif|etc.] <outfilename>.pdf
Note. a2ping.pl is a Perl script that calls on external helper programs to do its work. Input formats
include:PS(PostScript),EPS,PDF,PNG,JPEG,TIFF,PNM,BMP,GIF,LBM,XPM,PCX,TGA. Use
man a2pingfor moredetails. Thea2pingtoolhasnumerous optionsfor converting files.
The following code is a shell script (named pdf2ps) written by Herbert Voss that may be used or
modifiedaccording to individualneeds. This shell script accomplishes steps 2 and3 of the recommended
work-flowdescribedabove.ItcouldbemodifiedtoincludetheabovecommandforconvertingimagestoPDF
withtheresultbeinganEPSfilereadyforinclusioninaT
E
X
MACS
document. Thisauthorhasnotusedthis
shellscript.
#!/bin/sh
# $Id: pdf2eps,v 0.01 2005/10/28 00:55:46 Herbert Voss Exp $
# Convert PDF to encapsulated PostScript.
# usage:
# pdf2eps <page number> <pdf file without ext>
pdfcrop "$2.pdf" "$2-temp.pdf"
pdftops -f $1 -l $1 -eps "$2-temp.pdf" "$2.eps"
rm "$2-temp.pdf"
5 Some Sample Images
The following figures where inserted in or linked to the T
E
X
MACS
document used to create this article
as a PDF file. These are included for demonstrationpurposes only and do not represent sophisticated or
comprehensiveexamples. Theyareusefulfor the purposeathandnonetheless.
0
0.2
0.4
0.6
0.8
1
-1
-0.5
0
0.5
1
Figure1. EPSimagecreatedusinggnuplotandtheepscairo colorterminal
Figure1. isaninsertedEPSimage. It wascreatedusinggnuplotwiththeepscairo terminal. Inthis
casethe recommendedwork-flowis unnecessary becausewiththeepscairo terminal set gnuplot creates
anEPSfile directly with no conversionrequired,andno transparency effects are involved. The epscairo
terminalhasadefault“canvas”sizeof5inwidthby3inheight. Thisimagewascreatedwiththesizeoptions
set to4inwidthby 2inheight. Thegnuplotstatement usedfor this purposeis:
6
Section5
C# WPF PDF Viewer SDK to convert and export PDF document to other
Form Process. Data: Read, Extract Field Data. Data: Auto PDF, VB.NET Word, VB.NET Excel, VB.NET illustrates some conversion tabs and features for PDF exporting.
how to save pdf form data in reader; how to make pdf editable form reader
VB.NET Create PDF from images Library to convert Jpeg, png images
REImage. .NET converter control for exporting high quality PDF from images. Turn multiple image formats into one or multiple PDF file.
how to fill pdf form in reader; collect data from pdf forms
set terminal epscairo enhanced color font "sans,12" size 4in,2in
TocreatethissameimagefileusingtheMaximaplot2d functionor thedrawpackagerequirestheuser
to include these gnuplot options according to the particular methods usedby these two means of image
creation. Refer tothe Maxima Manual forthedetails.
-4
-3
-2
-1
0
1
2
3
4
-4
-3
-2
-1
0
1
2
3
4
y
x
Figure2. EPSimagecreatedusinggnuplotandthepostscript eps colorterminal
Figure2.isanimageofaplotgeneratedusinggnuplotandthepostscript eps colorterminal. Since
no transparency effects are involved, the image created in encapsulated PostScript form is inserted
directlyintothisdocumentusingthebuilt-inimage insertionmenuselectionofT
E
X
MACS
.Thisobviatesthe
needforconversionto PDF.
!"
!#
!$
!%
&'
&%
&$
&#
&"
!"
!#
!$
!%
&'
&%
&$
&#
&"
(
)
Figure3. PDFimagecreatedusinggnuplotandthepdfcairoterminalconvertedtoEPSusingpdftops -eps
SomeSampleImages
7
Figure3.isaPDFimageofthesameplotasFigure2.createdusinggnuplot.Inthiscasethepdfcairo
terminalwasusedtocreatethePDFimagefile. This filewas convertedtoEPSusingthepdftops toolwith
the -eps (encapsulated PostScript) optionset. The resultingencapsulated PostScript image is
inserteddirectlyintothis documentusingthebuilt-inimageinsertionmenuselectionofT
E
X
MACS
.Sinceno
transparency is involvedtheresultingEPSfile is not unusually largecomparedtotheparentPDFfile.
Figure4. PNGimagecreatedusinggnuplotandthepngcairoterminal
TheplotshownasFigure4.isaPNGimagefilecreatedusinggnuplotwiththepngcairoterminalset,
andinserteddirectlyusingthe built-inimage insertionmenuselectionof T
E
X
MACS
. Like theimages ofthe
figures above, this image does not involve any transparency effects. This obviates the needfor conversion
to PDF andEPS. The imagewas created with aresolutionof 640 by 480 pixels. Whenexportedto PDF
from T
E
X
MACS
theimage display quality may be marginal. Higher resolution may be required to improve
the displayorprintquality.
Note.ThereadershouldbeawareofananomalythatoccurswhenexportingfromaT
E
X
MACS
documentthat
containsPNGimagestoPDF. ThequalityoftheresultswilldependontheversionofT
E
X
MACS
usedandthe
PDFreaderprogramused.ThisPDFfilewasexportedfromT
E
X
MACS
fromthelatestMSWindowsversion.
Ifthissame fileis exportedtoPDFfromtheGNU/LinuxversionofT
E
X
MACS
,Figure4. above willappear
inthePDFfilerenderedusingtheGNU/LinuxEvincedocumentviewerprogramwithverygoodquality.
Ifthis samePDFfileisrenderedusingtheAdobeAcrobat Reader,Figure 4. renderswithmuchpoorer
quality. EvinceusesPoppler/CairowhereasAdobeAcrobatReaderdoesnot. However,ifthePDF
fileisexportedfrom theMS WindowsversionofT
E
X
MACS
thisissuedoesnotarise. Figure4. renderswell
8
Section5
inbothPDFreaders.Obviously,somethingishappeningdifferentlywiththePDFexportprocesswhenusing
theMS WindowsversionofT
E
X
MACS
.Asofthedateofthisarticle,thecauseofthisanomalyisamystery.
Whencreating or exporting to PNGimages the user must beaware of the effect resolutionhas onthe
qualityoftheimagewhenexportedfromT
E
X
MACS
toaPDFdocumentorprinted.. Afour inchwideimage
intendedfor printingat 300dpirequiresaPNGimage withawidthofno lessthan1200px. This imageis
thenscaledto4inwheninsertedinorlinkedtoaT
E
X
MACS
document.Thus,thedpiis1200px÷4inor300
px/in.Iftheresolutionisinadequatethentheresultmaybe“jaggies”intheimagesoftheexportedPDFfile.
Figure5. ExportedGeogebraPNGimagewithtransparencyinsertedintoT
E
X
MACS
withoutconversion.
Figure 5. above is a PNG image exported from Geogebra and inserted directly into this T
E
X
MACS
document. NotethatthetransparencyeffectsoftheoriginalPNGimagefilearenotretainedifthisimageis
convertedtoPDF.WhilethisPNGmayrenderasexpectedwhenviewedfromthesourceT
E
X
MACS
document,
itdoesnot renderas expectedwhenexportedtoPDF
Itshouldbenotedthatiftransparencyeffectsarenotinvolvedwiththeimage,thenimage filescreated,
exportedor saveddirectlyas EPS(e.g,gnuplotepscairo,Geogebra export toEPS,etc.)areprobably
the best choices inthis case. Compare this image tothat ofFigure8. below whichis arasterizedPDFfile
withtransparencyeffectsconvertedtoEPS.
Note. For Maxima and T
E
X
MACS
users — executing the plot2d() function with default options from
T
E
X
MACS
usingtheMaximapluginwillcauseawxtgnuplotterminaldisplaywindowtoappeardisplaying
the plot. However,theonlywaytosavetheplotasagraphicformatistocopyit totheclipboardusingthe
features of the wxt terminal graphics display window. Thereis no way to paste agraphics image directly
into a T
E
X
MACS
document from the clipboardunfortunately. The best alternative is to use the gnuplot
options available to write theimage directly to aPDF file using the pdfcairo terminal setting. This may
beaccomplishedafter usingthewxt terminal display windowtoverify that theplot is as intended.
SomeSampleImages
9
200
300
400
500
600
700
800
900
1000
0
2000
4000
6000
8000
10000
12000
p (hPa)
h (m)
Figure 6. PDFimagecreatedusingtheMaximadrawpackagewiththepdfcairoterminalandpdftops -eps
The PDFimage of Figure6. was createdusingMaxima andthedraw package. Thedraw package is a
Maxima interfaceto gnuplot,soindirectlythePDFfileusedfor thisfigurewas createdusinggnuplot.
The resulting PDF file was converted to EPS using the pdftops tool with the -eps (encapsulated
PostScript) option set. There are no transparency effects involved, so the size of the resulting EPS
file is not unusually large compared to the parent PDF file. The EPS file was inserted directly using
the built-inimage insertionmenuselectionof T
E
X
MACS
.
Figure 7. ExportedGeogebraPDFimageconvertedtoEPSusingpdftops -epsandinsertedintoT
E
X
MACS
10
Section5
Documents you may be interested
Documents you may be interested