<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for The Reluctant Blogger</title>
	<atom:link href="http://spitzkoff.com/craig/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://spitzkoff.com/craig</link>
	<description>Craig&#039;s blog about Life and Software Development</description>
	<lastBuildDate>Tue, 26 Mar 2013 03:30:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>Comment on Drawing polyines or routes on a MKMapView in iOS4 – Part 3 by Ace</title>
		<link>http://spitzkoff.com/craig/?p=136&#038;cpage=1#comment-722</link>
		<dc:creator>Ace</dc:creator>
		<pubDate>Tue, 26 Mar 2013 03:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=136#comment-722</guid>
		<description><![CDATA[This is probably the most clean and workable solution out there. Thanks Craig!]]></description>
		<content:encoded><![CDATA[<p>This is probably the most clean and workable solution out there. Thanks Craig!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creating a PDF with iOS by Adam</title>
		<link>http://spitzkoff.com/craig/?p=160&#038;cpage=1#comment-707</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Sat, 16 Feb 2013 12:24:50 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=160#comment-707</guid>
		<description><![CDATA[Thanks for the info/example!  It got me jump started in a direction that may work out.

Have you tried including an image per Student or per class?

I&#039;m working on rendering a PDF from Core Data.  Each row has an image and 4 test elements.

Should be 2-3 rows per page because each image I&#039;m making a fixed size (sort of large).]]></description>
		<content:encoded><![CDATA[<p>Thanks for the info/example!  It got me jump started in a direction that may work out.</p>
<p>Have you tried including an image per Student or per class?</p>
<p>I&#8217;m working on rendering a PDF from Core Data.  Each row has an image and 4 test elements.</p>
<p>Should be 2-3 rows per page because each image I&#8217;m making a fixed size (sort of large).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creating a PDF with iOS by Clément Wehrung</title>
		<link>http://spitzkoff.com/craig/?p=160&#038;cpage=1#comment-659</link>
		<dc:creator>Clément Wehrung</dc:creator>
		<pubDate>Sat, 17 Nov 2012 12:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=160#comment-659</guid>
		<description><![CDATA[I created a class based on every good advice I found around. I&#039;ve been digging a lot and I hope my class will offer some good start for anyone trying to create multi-page PDF directly out of some HTML source.

You&#039;ll find the whole code here with some basic sample code : https://github.com/iclems/iOS-htmltopdf

I had just the same issue as you and my requirements were:
- full PDF (real text, no bitmap) 
- smart multi-pages (compared to cutting a full height webview every X pixels...) 

Thus, the solution I use is pretty nice as it resorts to the same tools iOS uses to split pages for print.

Let me explain, I setup a UIPrintPageRenderer based on the web view print formatter (first tip) :

    UIPrintPageRenderer *render = [[UIPrintPageRenderer alloc] init];
    
    [render addPrintFormatter:webView.viewPrintFormatter startingAtPageAtIndex:0];
        
    CGRect printableRect = CGRectMake(self.pageMargins.left,
                                  self.pageMargins.top,
                                  self.pageSize.width - self.pageMargins.left - self.pageMargins.right,
                                  self.pageSize.height - self.pageMargins.top - self.pageMargins.bottom);
    
    CGRect paperRect = CGRectMake(0, 0, self.pageSize.width, self.pageSize.height);
    
    [render setValue:[NSValue valueWithCGRect:paperRect] forKey:@&quot;paperRect&quot;];
    [render setValue:[NSValue valueWithCGRect:printableRect] forKey:@&quot;printableRect&quot;];

    NSData *pdfData = [render printToPDF];
        
    [pdfData writeToFile: self.PDFpath  atomically: YES];

In the meantime, I have created a category on UIPrintPageRenderer to support:

    -(NSData*) printToPDF
    {
        [self doNotRasterizeSubviews:self.view];

        NSMutableData *pdfData = [NSMutableData data];
        
        UIGraphicsBeginPDFContextToData( pdfData, CGRectZero, nil );
        
        [self prepareForDrawingPages: NSMakeRange(0, self.numberOfPages)];
    
        CGRect bounds = UIGraphicsGetPDFContextBounds();
        
        for ( int i = 0 ; i &lt; self.numberOfPages ; i++ )
        {
            UIGraphicsBeginPDFPage();
            
            [self drawPageAtIndex: i inRect: bounds];
        }
        
        UIGraphicsEndPDFContext();
            
        return pdfData;
    }]]></description>
		<content:encoded><![CDATA[<p>I created a class based on every good advice I found around. I&#8217;ve been digging a lot and I hope my class will offer some good start for anyone trying to create multi-page PDF directly out of some HTML source.</p>
<p>You&#8217;ll find the whole code here with some basic sample code : <a href="https://github.com/iclems/iOS-htmltopdf" rel="nofollow">https://github.com/iclems/iOS-htmltopdf</a></p>
<p>I had just the same issue as you and my requirements were:<br />
- full PDF (real text, no bitmap)<br />
- smart multi-pages (compared to cutting a full height webview every X pixels&#8230;) </p>
<p>Thus, the solution I use is pretty nice as it resorts to the same tools iOS uses to split pages for print.</p>
<p>Let me explain, I setup a UIPrintPageRenderer based on the web view print formatter (first tip) :</p>
<p>    UIPrintPageRenderer *render = [[UIPrintPageRenderer alloc] init];</p>
<p>    [render addPrintFormatter:webView.viewPrintFormatter startingAtPageAtIndex:0];</p>
<p>    CGRect printableRect = CGRectMake(self.pageMargins.left,<br />
                                  self.pageMargins.top,<br />
                                  self.pageSize.width &#8211; self.pageMargins.left &#8211; self.pageMargins.right,<br />
                                  self.pageSize.height &#8211; self.pageMargins.top &#8211; self.pageMargins.bottom);</p>
<p>    CGRect paperRect = CGRectMake(0, 0, self.pageSize.width, self.pageSize.height);</p>
<p>    [render setValue:[NSValue valueWithCGRect:paperRect] forKey:@&#8221;paperRect&#8221;];<br />
    [render setValue:[NSValue valueWithCGRect:printableRect] forKey:@&#8221;printableRect&#8221;];</p>
<p>    NSData *pdfData = [render printToPDF];</p>
<p>    [pdfData writeToFile: self.PDFpath  atomically: YES];</p>
<p>In the meantime, I have created a category on UIPrintPageRenderer to support:</p>
<p>    -(NSData*) printToPDF<br />
    {<br />
        [self doNotRasterizeSubviews:self.view];</p>
<p>        NSMutableData *pdfData = [NSMutableData data];</p>
<p>        UIGraphicsBeginPDFContextToData( pdfData, CGRectZero, nil );</p>
<p>        [self prepareForDrawingPages: NSMakeRange(0, self.numberOfPages)];</p>
<p>        CGRect bounds = UIGraphicsGetPDFContextBounds();</p>
<p>        for ( int i = 0 ; i &lt; self.numberOfPages ; i++ )<br />
        {<br />
            UIGraphicsBeginPDFPage();</p>
<p>            [self drawPageAtIndex: i inRect: bounds];<br />
        }</p>
<p>        UIGraphicsEndPDFContext();</p>
<p>        return pdfData;<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ouch by Frank Kashner</title>
		<link>http://spitzkoff.com/craig/?p=93&#038;cpage=1#comment-649</link>
		<dc:creator>Frank Kashner</dc:creator>
		<pubDate>Sat, 04 Aug 2012 21:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.arlingtondev.com/thoughts/?p=93#comment-649</guid>
		<description><![CDATA[I would like to speak to the people who created an owned jobvent.  Is there anyway?]]></description>
		<content:encoded><![CDATA[<p>I would like to speak to the people who created an owned jobvent.  Is there anyway?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ouch by Frank Kashner</title>
		<link>http://spitzkoff.com/craig/?p=93&#038;cpage=1#comment-648</link>
		<dc:creator>Frank Kashner</dc:creator>
		<pubDate>Sat, 04 Aug 2012 21:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.arlingtondev.com/thoughts/?p=93#comment-648</guid>
		<description><![CDATA[I hope that your health is OK.  Do you have any interest in creating a more powerful version, capable of encouraging social action?]]></description>
		<content:encoded><![CDATA[<p>I hope that your health is OK.  Do you have any interest in creating a more powerful version, capable of encouraging social action?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Objective-C SHA1 Function for the iPhone by Objective-C SHA1 Function for the iPhone &#171; Collectibles</title>
		<link>http://spitzkoff.com/craig/?p=122&#038;cpage=1#comment-643</link>
		<dc:creator>Objective-C SHA1 Function for the iPhone &#171; Collectibles</dc:creator>
		<pubDate>Tue, 31 Jul 2012 23:19:42 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=122#comment-643</guid>
		<description><![CDATA[[...] From : http://spitzkoff.com/craig/?p=122 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] From : <a href="http://spitzkoff.com/craig/?p=122" rel="nofollow">http://spitzkoff.com/craig/?p=122</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using MKAnnotation, MKPinAnnotationView and creating a custom MKAnnotationView in an MKMapView by Carly Rae Jepsen Sex Tape</title>
		<link>http://spitzkoff.com/craig/?p=81&#038;cpage=2#comment-641</link>
		<dc:creator>Carly Rae Jepsen Sex Tape</dc:creator>
		<pubDate>Tue, 24 Jul 2012 17:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.arlingtondev.com/thoughts/?p=81#comment-641</guid>
		<description><![CDATA[you&#124;and allow you to} know how {much&#124;great&#124;really&#124;, very]]></description>
		<content:encoded><![CDATA[<p>you|and allow you to} know how {much|great|really|, very</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drawing polyines or routes on a MKMapView (Using Map Kit on the iPhone) by 8hast4nbtkt</title>
		<link>http://spitzkoff.com/craig/?p=65&#038;cpage=2#comment-640</link>
		<dc:creator>8hast4nbtkt</dc:creator>
		<pubDate>Wed, 04 Jul 2012 01:44:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.arlingtondev.com/thoughts/?p=65#comment-640</guid>
		<description><![CDATA[So i&#039;m pleased for everyone due to this fact reliable information. You really did make the evening :]]></description>
		<content:encoded><![CDATA[<p>So i&#8217;m pleased for everyone due to this fact reliable information. You really did make the evening :</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drawing polyines or routes on a MKMapView (as an MKAnnotationView) &#8211; Part 2 by how to get Route directions between two points on a map to draw driving directions? - Tech Forum Network</title>
		<link>http://spitzkoff.com/craig/?p=108&#038;cpage=2#comment-639</link>
		<dc:creator>how to get Route directions between two points on a map to draw driving directions? - Tech Forum Network</dc:creator>
		<pubDate>Mon, 02 Jul 2012 01:56:12 +0000</pubDate>
		<guid isPermaLink="false">http://spitzkoff.com/craig/?p=108#comment-639</guid>
		<description><![CDATA[[...] have seen in this tutorial Drawing polyines or routes on a MKMapView that how to draw driving direction using core graphics&#8230;but in the sample code it has [...]]]></description>
		<content:encoded><![CDATA[<p>[...] have seen in this tutorial Drawing polyines or routes on a MKMapView that how to draw driving direction using core graphics&#8230;but in the sample code it has [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drawing polyines or routes on a MKMapView (Using Map Kit on the iPhone) by Adding a route to a MKMapView &#124; appsgoogleplus.com</title>
		<link>http://spitzkoff.com/craig/?p=65&#038;cpage=2#comment-638</link>
		<dc:creator>Adding a route to a MKMapView &#124; appsgoogleplus.com</dc:creator>
		<pubDate>Sat, 16 Jun 2012 16:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.arlingtondev.com/thoughts/?p=65#comment-638</guid>
		<description><![CDATA[[...] trying to add a routing feature to an app I&#8217;m working on. I found Craig Spitzkoff&#8217;s article on how to draw lines on an MKMapView which works pretty good. But since I don&#8217;t have the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] trying to add a routing feature to an app I&#8217;m working on. I found Craig Spitzkoff&#8217;s article on how to draw lines on an MKMapView which works pretty good. But since I don&#8217;t have the [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
