<?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 : PDF view</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 : Sample Code : PDF view]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 11 May 2026 23:16:37 +0000</pubDate>
  <lastBuildDate>Tue, 30 May 2006 03:54:33 +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=329</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[PDF view : Hi cpri,  thanks, I realized the...]]></title>
   <link>http://www.quickpdf.org/forum/pdf-view_topic329_post1892.html#1892</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=361">ECPVFR</a><br /><strong>Subject:</strong> 329<br /><strong>Posted:</strong> 30 May 06 at 3:54AM<br /><br />Hi cpri,<br /><br />thanks, I realized the 'problem' when testing with large PDF files (2-15 pages) containing images.<br /><br />At the project I need the viewer for:<br />Every PDF has only one page and contains NO images. For this use Your viewer is excellent!]]>
   </description>
   <pubDate>Tue, 30 May 2006 03:54:33 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdf-view_topic329_post1892.html#1892</guid>
  </item> 
  <item>
   <title><![CDATA[PDF view : Hello I took a look at your problem,...]]></title>
   <link>http://www.quickpdf.org/forum/pdf-view_topic329_post1887.html#1887</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=290">cpri</a><br /><strong>Subject:</strong> 329<br /><strong>Posted:</strong> 30 May 06 at 2:12AM<br /><br /><P>Hello</P><P>I took a look at your problem, and I think it's due to the memory.</P><P>In the code a image is created with the size of the complete pdf. So if you have a lot of pages you need a lot of memory.</P><P>My viewer isn't optimized for that. If you need to view a lot of pages thge best thing you can do is make sections. Something like the prev_Section main_Section and next_Section. The main_section contains an image (only one page) with the page you are looking at the prev_section contains the previous page and the next_section conatins the next page. Every time you scroll up or down the sections are updated with the right pages. By using more secrions you can do the rendering to image in the background.</P><P>Because the programs I made doesn't have to deal with a lot of pages I didn't optimize the viewer for that. But every one who has ideas to make this viewer better please be my guest and update the viewer to your own needs.</P>]]>
   </description>
   <pubDate>Tue, 30 May 2006 02:12:23 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdf-view_topic329_post1887.html#1887</guid>
  </item> 
  <item>
   <title><![CDATA[PDF view : Sorry I can&amp;#039;t help you I...]]></title>
   <link>http://www.quickpdf.org/forum/pdf-view_topic329_post1861.html#1861</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=290">cpri</a><br /><strong>Subject:</strong> 329<br /><strong>Posted:</strong> 23 May 06 at 1:23AM<br /><br />Sorry I can't help you I tested it with documents with a lot of pages and I found no problem what so ever]]>
   </description>
   <pubDate>Tue, 23 May 2006 01:23:37 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdf-view_topic329_post1861.html#1861</guid>
  </item> 
  <item>
   <title><![CDATA[PDF view : Hello Christian,  today I tested...]]></title>
   <link>http://www.quickpdf.org/forum/pdf-view_topic329_post1857.html#1857</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=361">ECPVFR</a><br /><strong>Subject:</strong> 329<br /><strong>Posted:</strong> 22 May 06 at 11:22AM<br /><br />Hello Christian,<br /><br />today I tested Your "TQuickPDFViewer" component and it works well.<br />The only problem is: if I'm loading PDF docs with two or more pages, it is VERY SLOW (30 - 60 seconds for FOUR pages...).<br />Do You have an idea why it takes so much time??]]>
   </description>
   <pubDate>Mon, 22 May 2006 11:22:26 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdf-view_topic329_post1857.html#1857</guid>
  </item> 
  <item>
   <title><![CDATA[PDF view : I updated the code. I also made...]]></title>
   <link>http://www.quickpdf.org/forum/pdf-view_topic329_post1417.html#1417</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=290">cpri</a><br /><strong>Subject:</strong> 329<br /><strong>Posted:</strong> 24 Feb 06 at 2:10AM<br /><br /><P>I updated the code. I also made the image look more like a page.</P><P>For me it works fine. If you have any suggestions, commands or additions please let me know</P><P>&nbsp;</P><P>unit pdfview;</P><P>interface<BR>uses<BR>&nbsp; Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<BR>&nbsp; Dialogs, StdCtrls,uiSEDQuickPDF, ExtCtrls,Jpeg,printers;</P><P>type<BR>&nbsp;Tborder = record<BR>&nbsp; height: integer;<BR>&nbsp; width: integer;<BR>&nbsp;end;</P><P>&nbsp;Tpage =record<BR>&nbsp; height:integer;<BR>&nbsp; width:integer;<BR>&nbsp; first :integer;<BR>&nbsp; last&nbsp; :integer;<BR>&nbsp; Number: integer;<BR>&nbsp;end;</P><P>&nbsp;TQuickPDFViewer = class(Tscrollbox)<BR>&nbsp; private<BR>&nbsp;&nbsp; Image&nbsp; :Timage;<BR>&nbsp;&nbsp; QP&nbsp;&nbsp;&nbsp;&nbsp; : TiSEDQuickPDF;<BR>&nbsp;&nbsp; FFileName: string;<BR>&nbsp;&nbsp; Border: Tborder;<BR>&nbsp;&nbsp; Page:Tpage;<BR>&nbsp;&nbsp; FLastPage: integer;<BR>&nbsp;&nbsp; FFirstPage: integer;</P><P>&nbsp;&nbsp; procedure set_LoadFile(const FileName: string);<BR>&nbsp;&nbsp; procedure makePages;<BR>&nbsp;&nbsp; procedure setFirstPage(const Value: integer);<BR>&nbsp;&nbsp; procedure setLastPage(const Value: integer);<BR>&nbsp; protected<BR>&nbsp;&nbsp; defaultprinter: string;<BR>&nbsp;&nbsp; procedure HandleMessage(var Msg: TMsg; var Handled: Boolean);<BR>&nbsp; public<BR>&nbsp;&nbsp; constructor create(Aowner:Tcomponent); override;<BR>&nbsp;&nbsp; destructor destroy; override;<BR>&nbsp;&nbsp; procedure show;<BR>&nbsp;&nbsp; procedure Print;&nbsp;&nbsp; <BR>&nbsp; published<BR>&nbsp;&nbsp; property LoadFile: string read FFileName write set_LoadFile;<BR>&nbsp;&nbsp; property FirstPage: integer read FFirstPage write setFirstPage;<BR>&nbsp;&nbsp; property LastPage: integer read FLastPage write setLastPage;</P><P>&nbsp;end;<BR>implementation</P><P>{ TQuickPDFViewer }</P><P>constructor TQuickPDFViewer.create(Aowner: Tcomponent);<BR>begin<BR>inherited create(Aowner);<BR>parent:=Twincontrol(Aowner);<BR>visible:=false;<BR>Left:=0;<BR>Top:=0;<BR>height:=Twincontrol(Aowner).Height -40;<BR>width:=Twincontrol(Aowner).width -100;<BR>border.height:=40;<BR>border.width:=30;<BR>image:= TImage.create(self);<BR>image.Parent:=self;<BR>QP := TiSEDQuickPDF.Create;<BR>QP.UnlockKey('...'); //fill in you key I'm not gonna make a mistake twice ;-)<BR>invalidate;<BR>application.OnMessage :=handleMessage;<BR>defaultprinter:='odprn005';&nbsp; //This is the printername wich I used plaese fill in a valid one fot your case<BR>end;</P><P>destructor TQuickPDFViewer.destroy;<BR>begin<BR>&nbsp; image.Free;<BR>&nbsp; QP.free;<BR>&nbsp; inherited;<BR>end;</P><P>//I need this because I have some trouble with scrolling</P><P>procedure TQuickPDFViewer.HandleMessage(var Msg: TMsg;<BR>&nbsp; var Handled: Boolean);<BR>begin<BR>if Msg.Message = WM_MOUSEWHEEL then<BR>begin<BR>&nbsp;Msg.lParam&nbsp;&nbsp;&nbsp; := 0;<BR>&nbsp;if Msg.wParam &gt; 0 then<BR>&nbsp; self.VertScrollBar.Position:=self.VertScrollBar.Position-75<BR>&nbsp;else<BR>&nbsp; self.VertScrollBar.Position:=self.VertScrollBar.Position+75;<BR>&nbsp;Handled := true;<BR>end;</P><P>end;</P><P>procedure TQuickPDFViewer.makePages;<BR>var i: integer;<BR>begin</P><P>&nbsp;image.Top :=0;<BR>&nbsp;image.Left:=0;<BR>&nbsp;image.Height :=page.Height*page.Number&nbsp; +(page.Number+1)*border.height;<BR>&nbsp;image.Width :=page.Width +2*border.width ;<BR>&nbsp;image.Canvas.Brush.Color :=clgray;<BR>&nbsp;image.Canvas.Brush.style :=bsSolid;<BR>&nbsp;image.Canvas.Pen.Style :=Psclear;<BR>&nbsp;image.Canvas.Rectangle(0,0,border.width ,image.height);<BR>&nbsp;image.Canvas.Rectangle(image.Width-border.width,0,image.Width ,image.height);</P><P>&nbsp;for i:=0 to page.Number&nbsp; do<BR>&nbsp;begin<BR>&nbsp; image.Canvas.Rectangle(0,(i* (border.height+page.height)),image.Width ,(i* (border.height+page.height))+border.height);<BR>&nbsp;end;</P><P>&nbsp;image.Canvas.Brush.Color :=clgray;<BR>&nbsp;image.Canvas.Brush.style :=bsClear;<BR>&nbsp;image.Canvas.Pen.Style :=psSolid;<BR>&nbsp;image.Canvas.Pen.color :=clblack;</P><P>&nbsp;for i:=0 to page.Number-1&nbsp; do<BR>&nbsp;begin<BR>&nbsp; image.Canvas.Rectangle(border.width-1,((i+1)*border.height)-1+(i*page.height) ,image.Width - border.width+1,(page.Height+border.height)*(i+1)+1);<BR>&nbsp;end;</P><P>end;</P><P>procedure TQuickPDFViewer.Print;<BR>begin</P><P>QP.PrintDocument(defaultprinter,firstpage,lastpage,0);<BR>end;</P><P>procedure TQuickPDFViewer.setFirstPage(const Value: integer);<BR>begin<BR>&nbsp; FFirstPage := Value;<BR>&nbsp; page.first:=value;<BR>&nbsp; page.number:=page.last-page.first+1;<BR>end;</P><P>procedure TQuickPDFViewer.setLastPage(const Value: integer);<BR>begin<BR>&nbsp; FLastPage := Value;<BR>&nbsp; page.last:=value;<BR>&nbsp; page.number:=page.last-page.first+1;</P><P>end;</P><P>procedure TQuickPDFViewer.set_LoadFile(const FileName: string);<BR>var<BR>&nbsp;JpegStream:Tmemorystream;<BR>&nbsp;JPEG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : TJpegImage;<BR>begin<BR>FFileName := FileName;<BR>JPEG:=TJpegImage.create;<BR>JpegStream:=Tmemorystream.Create;<BR>try<BR>//<BR>&nbsp;QP.LoadFromFile(filename);<BR>&nbsp;FirstPage:=1;<BR>&nbsp;LastPage:=QP.PageCount;<BR>&nbsp;QP.RenderPageToStream(75,1,1,jpegstream);<BR>&nbsp;jpegstream.Seek(0,0);<BR>&nbsp;JPEG.LoadFromStream(jpegstream);<BR>&nbsp;page.height :=jpeg.Height ;<BR>&nbsp;page.width :=jpeg.width ;<BR>finally<BR>&nbsp;jpegstream.Free ;<BR>&nbsp;JPEG.Free ;<BR>end;<BR>end;</P><P>procedure TQuickPDFViewer.show;<BR>var i,j: integer;<BR>&nbsp;JpegStream:Tmemorystream;<BR>&nbsp;JPEG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : TJpegImage;<BR>&nbsp;JpegImage: Timage;<BR>begin<BR>MakePages;<BR>JPEG:=TJpegImage.create;<BR>JpegStream:=Tmemorystream.Create;<BR>JpegImage:=Timage.Create(self);<BR>try<BR>&nbsp;j:=0;<BR>&nbsp;for i:=FirstPage to LastPage do<BR>&nbsp;begin<BR>&nbsp; if i &gt; qp.PageCount then<BR>&nbsp; begin<BR>&nbsp;&nbsp; visible:=true;<BR>&nbsp;&nbsp; exit;<BR>&nbsp; end;<BR>&nbsp; jpegstream.Clear;<BR>&nbsp; QP.RenderPageToStream(75,i,1,jpegstream);<BR>&nbsp; jpegstream.Seek(0,0);<BR>&nbsp; JPEG.LoadFromStream(jpegstream);<BR>&nbsp; jpegimage.Picture.Assign(JPEG);<BR>&nbsp; image.Canvas.Draw(border.width,(j+1)*border.height+ j*page.height,jpegimage.Picture.Graphic);<BR>&nbsp; inc(j);<BR>&nbsp;end;<BR>&nbsp;visible:=true;<BR>finally<BR>&nbsp;jpegstream.Free ;<BR>&nbsp;JPEG.Free ;<BR>&nbsp;jpegimage.free;<BR>end;</P><P>end;</P><P>end.</P>]]>
   </description>
   <pubDate>Fri, 24 Feb 2006 02:10:43 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdf-view_topic329_post1417.html#1417</guid>
  </item> 
  <item>
   <title><![CDATA[PDF view : I want to use quickpdf as a viewer....]]></title>
   <link>http://www.quickpdf.org/forum/pdf-view_topic329_post1403.html#1403</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=290">cpri</a><br /><strong>Subject:</strong> 329<br /><strong>Posted:</strong> 23 Feb 06 at 2:15AM<br /><br /><P>I want to use quickpdf as a viewer. So I started with a very simple viewer. The idea is to build a VCL component that can do all the viewing things I want. So first here's is my very basic code for viewing pdf's In the future I will post my extentions to this code. </P><P>procedure TForm1.Button1Click(Sender: TObject);<BR>var<BR>&nbsp;QP: TiSEDQuickPDF;<BR>&nbsp;Test_Stream:Tmemorystream;<BR>&nbsp;JPEG : TJpegImage;</P><P>begin<BR>&nbsp;QP := TiSEDQuickPDF.Create;<BR>&nbsp;JPEG:=TJpegImage.create;<BR>&nbsp;Test_Stream:=Tmemorystream.Create;<BR>&nbsp;try<BR>&nbsp;&nbsp; QP.UnlockKey('...');<BR>&nbsp;&nbsp; QP.LoadFromFile('c:\test.pdf');<BR>&nbsp;&nbsp; QP.RenderPageToStream(75,1,1,test_stream);<BR>&nbsp;&nbsp; test_stream.Seek(0,0);<BR>&nbsp;&nbsp; JPEG.LoadFromStream(test_stream);<BR>&nbsp;&nbsp; image1.Top :=0;<BR>&nbsp;&nbsp; image1.Left:=0;<BR>&nbsp;&nbsp; image1.Height :=jpeg.Height ;<BR>&nbsp;&nbsp; image1.Width :=jpeg.Width;<BR>&nbsp;&nbsp; image1.Picture.Assign(Jpeg);<BR>&nbsp;finally<BR>&nbsp;&nbsp; QP.Free;<BR>&nbsp;&nbsp; test_stream.Free ;<BR>&nbsp;&nbsp; JPEG.Free ;</P><P>&nbsp;end;</P><P>end;</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 23 Feb 2006 02:15:47 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/pdf-view_topic329_post1403.html#1403</guid>
  </item> 
 </channel>
</rss>