SVG file render image in smaller size - iphone

I am working for the first time with SVG files. I an able to load SVG files on webview but the images are rendering smaller than the original.
they are getting shrinked by a particular factor...... Is there some solution to my problem??? pls help.
Thank You
Meet bhatha

Have you set the UIWebView to Scale To Fit?

Pretty old question, but it is solved applying some javascript magic. Please read this post: UIWebView with just an image that should fit the whole view

Related

How to make pdf to fit to screen size in vfr reader

i am using this vfr reader to show pdf pages.i need to make the pdf page to fit to the entire screen. how can i do this. I tried everything but couldn’t get it. Can someone please lead me to in right direction.
Thanks in advance.
I found a way: Set the statusbar to hidden in viewWillAppear of ReaderViewController, then set READER_SHOW_SHADOWS to FALSE and CONTENT_INSET to 0 in ReaderContentView. Also, make sure your PDF's aspect ratio is 4:3.
In initWithURL:page:password method of ReaderContentPage.m, you need to set viewRect.size to full screen size.

Loading PDFs or Images from URL into a CoverFlow view

I want to load PDFs or Images into a View, but when the source is an URL there might be connection lags, so I wonder what is the best approach when loading content (like magazines) into a Coverflow view in the iPhone?.
(For Coverflow, something like this: http://apparentlogic.com/openflow/ )
Is it ok to get a pdf file then
obtain corresponding page images and
show them in an appropriate
resolution a Coverflow view?
(Downloading the hole PDF might take
long)
Or is better to download images as
needed and then pass them to the
Coverflow? (Although resolution
might be a problem, hence maybe I
wil need more than one image per
page)
Would it be better to have a pdf
file for every page?(So they can be
rendered at any resolution and I
don't have to download the hole file
at once)
I hope you can give some advices on this.
Thanks in advance.
Just for the record:
After some research I came up with images approach. They are the simpler, fastest, and reasonable good resolution. They can be loaded in 2 stages, regular resolution and better resolution for zooming, etc.

How to fit PDF height in UIWebView in iPhone/iPad

I have a project that uses a UIWebView to display a single page PDF file. I would like this content to fit by height (vertically). The default is only to fit width (horizontally). Is there any way to overcome this?
I ran against the same problem and couldn't find a way to do it with UIWebView. If you only want to display a single PDF-page, you can pretty much take the code from Apple's ZoomingPDFViewer Example.
I took the two classes PDFScrollView and TiledPDFView and with a little adjustment for my project, I was easily able to use it to display a single PDF page.

How do I resize and save an image on the iPhone?

I want to save the image that is pinched to different size from original size. How could
I save it? How should I write the code ?
You should be able to find your answers in this question: https://stackoverflow.com/questions/1282830/uiimagepickercontroller-uiimage-memory-and-more
The answers to these questions provide a few different ways of resizing UIImages:
"What’s the easiest way to resize/optimize an image size with the iPhone SDK?"
"UIImage: Resize, then Crop"

UIWebView With PDF

I'm displaying a PDF file using UIWebView, and I want to do 2 things:
I want to make the page fit the phone screen without the user has to double tap to do that
I want to remove the margin with gray shadow around the displayed PDF
Thanks for helping
I don't think this will help much, but I think your best option is to render the PDF to an image (of decent DPI) and show the image instead. I do this for an app, but we do that server side using ImageMagick - don't know how you might do that in obj-c. Also note that a mostly-text PDF will be much larger (filesize) when rasterized.
However, you might also try to embed the PDF in HTML page and load that HTML in the WebView - that may at least avoid the gray border/artboard.
webView.transform = CGAffineTransformScale( webView.transform, 1.25, 1.25 );
2 - Checking the Scale Pages to Fit box in IB sorted this for me
I would also like to know the answer to 1.
I guess you want to know how to display the PDF in the same way as when opening as attachment in mail, where the navigation bar only appears on a tap and the status bar also disappears?
You can also use Quartz to do it, as explained here : http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
Where has CGAFFineTransformScale been all my life?
Seriously, that is a big help. However, it worked better applying it to webView.scrollView.
Finally, is there a similar command to change the offset of the content as well as the scale?