itext


I want to scale the shapes like rectange, circle, line on the page in itextsharp


the issue I am facing is that when I draw large shapes it coordinates goes out from the page. what should I do to scale even large shapes on text sharp?
string filename = string.Format("Report.pdf");
Document doc;
PdfWriter writer;
private void button1_Click(object sender, EventArgs e) {
FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.Write, FileShare.None);
doc = new Document(PageSize.A4.Rotate());
writer = PdfWriter.GetInstance(doc, fs);
doc.Open();
Phrase logo = new Phrase("Plate Properties\n");
logo.Add("\nBreath of Plate (mm)= " + "20");
string url = "https://www.google.com.pk/logos/doodles/2017/earth-day-2017-5650394117046272-s.png";
Image jpg = Image.GetInstance(new Uri(url));
PdfContentByte cb = writer.DirectContent;
cb.Rectangle(85, 85, 1000, 2000);
cb.Stroke();
jpg.ScalePercent(200f);
doc.Add(jpg);
doc.Add(logo);
doc.Close();
}

Related Links

MakeSignature.signDetached throws No Such Algorithm exception (SUN provider & SHA-256)
iText: PdfContentByte.rectangle(Rectangle) does not behave as expected
itextpdf XMLWorker Document
Inserting a “linked rectangle” with itext
Rendering Images inside PDF, images not being rendered in PDF Viewer 0.1.8
PDF Reader revocation tab doesn't show OCSP response
iText — How do I identify a single font that can print all the characters in a string?
iText: How to set page events for footer accounting for page rotation?
itext AcroFields form onto second page, needs to keep same template
Reduce size of iText generated PDF including time series bar chart
iText Signature Verification Detail
How to see page numbers with IText and the landscape format
Update TOC after merging 2 pdfs using itext
Is it possible to remove a page during document creation, like a “transaction” in databases
An appearance was requested without a variable text field
iText - Add text to existing landscape document

Categories

HOME
converter
jsf
elixir
puzzle
checkbox
angular-cli
raspbian
nuxeo
jbehave
thunderbird-addon
google-sheets-api
actionscript
matplotlib
is-empty
yocto
iis-7.5
filter
sequelize.js
proguard
onenote-api
xul
gatsby
qt-installer
rebol2
line-api
lstm
scaling
scenebuilder
jive
tortoisegit
cvs2svn
jquery-form-validator
rworldmap
spring-test
myob
continuous-deployment
lync-2013
bus-error
image-quality
fetch-api
xilinx-ise
reply
dd-wrt
referenceerror
division
npm-shrinkwrap
service-locator
honeysql
windows-10-iot-core
google-guava-cache
broadleaf-commerce
wfp
poco-libraries
common.logging
web-development-server
sendgrid-templates
xbim
paho
startapp
openweathermap
tableau-server
double-buffering
crystal-reports-8.5
mbaas
instruction-set
launch
iphone-developer-program
addin-express
communication-protocol
garrys-mod
verbose
typhoon
jackson-databind
multilingual-app-toolkit
project-online
self-hosting
webhdfs
ipojo
team-build
ffserver
ytplayerview
ffprobe
scrollspy
guzzle6
code-first-migrations
hg-git
em
bsp
wss
picat
ssms-addin
android-looper
opendata
gamepad
windows-mobile-6
loop-invariant
carddav
lame
dwolla
vertical-scrolling
arbor.js
ubuntu-11.10
z-machine
isolatedstorage
v4l
tcxgrid
django-nose
libavformat
pantheios
hadoop-plugins
pci-bus
data-entry
cots

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App