<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : DeleteAnnotati&#111;n</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : DeleteAnnotati&#111;n]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 19:08:52 +0000</pubDate>
  <lastBuildDate>Tue, 08 May 2012 15:23:40 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=2254</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[DeleteAnnotati&#111;n : Each content stream contains drawing...]]></title>
   <link>http://www.quickpdf.org/forum/deleteannotation_topic2254_post9570.html#9570</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2254<br /><strong>Posted:</strong> 08 May 12 at 3:23PM<br /><br />Each content stream contains drawing commands. &nbsp;When the PDF renders it processes each contentstream 1 after the other and draws what is contained in the each stream.&nbsp;<div><br></div><div>Because the contentsteams contain the only copy of the drawing commands they cannot be recreated. &nbsp;The only way they can be recreated is by reloading the file.</div><div><br></div><div>As Ingo points out, &nbsp;DrawBox draws a graphical rectangle onto the page. &nbsp;A rectangle is not a true PDF Annotation object. &nbsp;You need to use&nbsp;<span style=": rgb251, 251, 253; text-align: left; ">AddNoteAnnotation to add a proper annotation which is a special separate object that is not included in the content stream but is stored in a list of Annotations. &nbsp;Annotations are always drawn after all of the contentstreams have been drawn.</span></div><div><span style=": rgb251, 251, 253; text-align: left; "><br></span></div><div><span style=": rgb251, 251, 253; text-align: left; ">Andrew.</span></div>]]>
   </description>
   <pubDate>Tue, 08 May 2012 15:23:40 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/deleteannotation_topic2254_post9570.html#9570</guid>
  </item> 
  <item>
   <title><![CDATA[DeleteAnnotati&#111;n :   IngoThanks for the reply.To...]]></title>
   <link>http://www.quickpdf.org/forum/deleteannotation_topic2254_post9569.html#9569</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1931">John</a><br /><strong>Subject:</strong> 2254<br /><strong>Posted:</strong> 08 May 12 at 2:24PM<br /><br />Ingo<div>&nbsp;</div><div>Thanks for the reply.</div><div>&nbsp;</div><div>To clarify, my first post.</div><div><div>a) Each PDF opened, is associated with a database record which stores the original content stream count.&nbsp; </div><div>b)&nbsp;This allows me to know&nbsp;the content stream number of the layer/stream that&nbsp;I created when the PDF was originally opened and select that content stream when the&nbsp;pdf is loaded.</div><div>c) All drawboxes or putlines placed on an existing PDF are placed on the content stream that I created when the PDF was original opened.</div><div>&nbsp;</div><div>If I render a page,&nbsp;delete the content stream on which I had previously placed a drawbox,&nbsp;save the PDF and rerender the page, the drawbox I had previously placed is gone.&nbsp; This action is as expected.&nbsp; I can then repeat this process of&nbsp;rendering the page, placing&nbsp;a new drawbox,&nbsp;resaving the PDF, viewing the redrawn drawbox and then again deleting the&nbsp;redrawn drawbox.&nbsp; </div><div>&nbsp;</div><div>All of the viewing, drawing and deletion is done from a single instantiation of a delphi form which does the following from the OnCreate event of the form</div><div>a) Instantiates an instance of QuickPDF, </div><div>b) loads the&nbsp;PDF document via&nbsp;tempQuickPDF.LoadFromFile and</div><div>c) sets the active stream/layer via a&nbsp;to call tempQuickPDF.SelectContentStream.</div><div>&nbsp;</div><div>Question:</div><div>How is it that I can repeatedly&nbsp;place a drawbox on&nbsp;a selected content stream and then delete the stream without either reloading the entire document or recreating the instantiation of tempQuickPDF?&nbsp;&nbsp;Does each rerendering of the page recreate all of the content streams (even those previously deleted) based on some variable that was defined when the pdf document was loaded into the instantiation of the tempQuickPDF?</div><div>&nbsp;</div><div>TIA</div><div>&nbsp;</div><div>John</div><div>&nbsp;</div></div>]]>
   </description>
   <pubDate>Tue, 08 May 2012 14:24:05 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/deleteannotation_topic2254_post9569.html#9569</guid>
  </item> 
  <item>
   <title><![CDATA[DeleteAnnotati&#111;n : John, When you delete annotations...]]></title>
   <link>http://www.quickpdf.org/forum/deleteannotation_topic2254_post9564.html#9564</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2254<br /><strong>Posted:</strong> 04 May 12 at 1:05PM<br /><br />John, &nbsp;<div><br></div><div>When you delete annotations or formfields then you need to delete them backwards. &nbsp;This is when you delete an annotation then the total number of annotations reduced by 1. &nbsp; This is why the loop must be backwards.</div><div><br></div><div><div style="text-align: left; : rgb251, 251, 253; ">procedure TformImageEnPDF.SpeedButton1Click(Sender: TObject);<br>var<br>&nbsp; I: Integer;<br>begin<br>showmessage('test' + #13 +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'CurrentPage = ' + IntToStr(tempQPDF.SelectedPage) + #13 +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'AnnotationCount = ' + IntToStr(tempQPDF.AnnotationCount));<br></div><div style="text-align: left; : rgb251, 251, 253; ">&nbsp; with tempQPDF do<br>&nbsp;&nbsp;&nbsp; begin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for I := AnnotationCount downto 1 do &nbsp;// step - 1 &nbsp;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; begin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DeleteAnnotation(I);</div><div style="text-align: left; : rgb251, 251, 253; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end;<br>&nbsp;&nbsp;&nbsp; end;<br>end;<br></div><div style="text-align: left; : rgb251, 251, 253; "><br></div></div><div style="text-align: left; : rgb251, 251, 253; ">Andrew</div>]]>
   </description>
   <pubDate>Fri, 04 May 2012 13:05:22 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/deleteannotation_topic2254_post9564.html#9564</guid>
  </item> 
  <item>
   <title><![CDATA[DeleteAnnotati&#111;n : Hi John!&amp;#034;...d)draw an annotation...]]></title>
   <link>http://www.quickpdf.org/forum/deleteannotation_topic2254_post9562.html#9562</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 2254<br /><strong>Posted:</strong> 04 May 12 at 6:38AM<br /><br />Hi John!<br><br>"...<br>d)&nbsp;draw an annotation on the rendered&nbsp;page&nbsp;&nbsp; <br>&nbsp;DrawBox(tempAnnotLeft, tempAnnotTop, tempAnnotWidth, tempAnnotHeight, 1);<br>..."<br><br>This draws a box on the page - nothing more and no real annotation ;-)<br>If you want to insert a real annotation you should use<br>AddNoteAnnotation<br>Please read here:<br>http://www.quickpdflibrary.com/help/quickpdf/AddNoteAnnotation.php<br>And all about annotations in general here:<br>http://www.quickpdflibrary.com/help/quickpdf/AnnotationsAndHotspotLinks.php<br><br>Cheers and welcome here,<br>Ingo<br><br><span style="font-weight: bold;"><b></b><br><br></span>]]>
   </description>
   <pubDate>Fri, 04 May 2012 06:38:01 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/deleteannotation_topic2254_post9562.html#9562</guid>
  </item> 
  <item>
   <title><![CDATA[DeleteAnnotati&#111;n :   HelloThe following works without...]]></title>
   <link>http://www.quickpdf.org/forum/deleteannotation_topic2254_post9561.html#9561</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1931">John</a><br /><strong>Subject:</strong> 2254<br /><strong>Posted:</strong> 04 May 12 at 3:50AM<br /><br />Hello<div>&nbsp;</div><div>The following works without a problem:</div><div>a)&nbsp;lnstantiate QPDF</div><div>&nbsp;&nbsp;&nbsp; tempQPDF := TQuickPDF.Create;</div><div>b)&nbsp;create a new content stream (layer)</div><div><div>   &nbsp;&nbsp;&nbsp; tempQPDF.NewContentStream;<br>c)&nbsp;render a page to stream</div></div><div>&nbsp;&nbsp;&nbsp; tempQPDF.RenderPageToStream(tempDPI, tempQPDF_PageNum, 1, tempMemoryStream);<br>d)&nbsp;draw an annotation on the rendered&nbsp;page</div><div>&nbsp;&nbsp;&nbsp; DrawBox(tempAnnotLeft, tempAnnotTop, tempAnnotWidth, tempAnnotHeight, 1);<br>e)&nbsp;then save the pdf file.</div><div>&nbsp;</div><div>Question: </div><div>When I reopen the saved&nbsp;pdf file and render the page on which I placed the annotation, tempQPDF.AnnotationCount returns 0.</div><div>&nbsp;</div><div>My goal is to delete all of the annotations on the page with the code below.</div><div>&nbsp;</div><div>procedure TformImageEnPDF.SpeedButton1Click(Sender: TObject);<br>var<br>&nbsp; I: Integer;<br>begin<br>showmessage('test' + #13 +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'CurrentPage = ' + IntToStr(tempQPDF.SelectedPage) + #13 +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'AnnotationCount = ' + IntToStr(tempQPDF.AnnotationCount));<br></div><div>&nbsp; with tempQPDF do<br>&nbsp;&nbsp;&nbsp; begin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for I := 1 to AnnotationCount do<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; begin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DeleteAnnotation(I);</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end;<br>&nbsp;&nbsp;&nbsp; end;<br>end;<br></div><div>Suggestions ??</div><div>&nbsp;</div><div>TIA</div><div>&nbsp;</div><div>John</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 04 May 2012 03:50:02 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/deleteannotation_topic2254_post9561.html#9561</guid>
  </item> 
 </channel>
</rss>