<?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 on: How to Use PDFjs to Parse PDF Documents in Angular	</title>
	<atom:link href="https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs/feed" rel="self" type="application/rss+xml" />
	<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs</link>
	<description>onthecode blog</description>
	<lastBuildDate>Mon, 31 Oct 2022 18:59:08 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>
	<item>
		<title>
		By: Artyom		</title>
		<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-12594</link>

		<dc:creator><![CDATA[Artyom]]></dc:creator>
		<pubDate>Mon, 31 Oct 2022 18:59:08 +0000</pubDate>
		<guid isPermaLink="false">https://onthecode.co.uk/?p=3024#comment-12594</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-7559&quot;&gt;Sajan&lt;/a&gt;.

Hey, Sajan.
I was able to fix this. 
so as I investigated textContent.items is of type TextItem &#124; TextMarkedContent so if we use (s as TextItem).str instead of just s.str we&#039;d get all compiled and running.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-7559">Sajan</a>.</p>
<p>Hey, Sajan.<br />
I was able to fix this.<br />
so as I investigated textContent.items is of type TextItem | TextMarkedContent so if we use (s as TextItem).str instead of just s.str we&#8217;d get all compiled and running.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Artyom		</title>
		<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-12593</link>

		<dc:creator><![CDATA[Artyom]]></dc:creator>
		<pubDate>Mon, 31 Oct 2022 18:53:21 +0000</pubDate>
		<guid isPermaLink="false">https://onthecode.co.uk/?p=3024#comment-12593</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-6542&quot;&gt;Ciprian&lt;/a&gt;.

As I wrote in my comment you have to add .promise in PdfReaderService class. So that you&#039;d have something like this

const pdf = await pdfjsLib.getDocument(pdfUrl).promise;

with that everything works like a charm]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-6542">Ciprian</a>.</p>
<p>As I wrote in my comment you have to add .promise in PdfReaderService class. So that you&#8217;d have something like this</p>
<p>const pdf = await pdfjsLib.getDocument(pdfUrl).promise;</p>
<p>with that everything works like a charm</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Artyom		</title>
		<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-12592</link>

		<dc:creator><![CDATA[Artyom]]></dc:creator>
		<pubDate>Mon, 31 Oct 2022 18:51:47 +0000</pubDate>
		<guid isPermaLink="false">https://onthecode.co.uk/?p=3024#comment-12592</guid>

					<description><![CDATA[Don&#039;t know when it was written, but found an error pdfjsLib.getDocument has to be referred as a pdfDocumentLoadingTask and then from there we should get a promise. so should be something like 
const pdfLoadingTask = pdfjsLib.getDocument(pdfUrl);
    pdfLoadingTask.promise.then((pdf) =&#062; {
      for(let i = 1; i &#060;= pdf._pdfInfo.numPages; i++) {
        ....

or const pdf = await pdfjsLib.getDocument(pdfUrl).promise;
which was missed in your code.

Anyways great article and great example. Thanks for showing this.]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t know when it was written, but found an error pdfjsLib.getDocument has to be referred as a pdfDocumentLoadingTask and then from there we should get a promise. so should be something like<br />
const pdfLoadingTask = pdfjsLib.getDocument(pdfUrl);<br />
    pdfLoadingTask.promise.then((pdf) =&gt; {<br />
      for(let i = 1; i &lt;= pdf._pdfInfo.numPages; i++) {<br />
        &#8230;.</p>
<p>or const pdf = await pdfjsLib.getDocument(pdfUrl).promise;<br />
which was missed in your code.</p>
<p>Anyways great article and great example. Thanks for showing this.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: c		</title>
		<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-8426</link>

		<dc:creator><![CDATA[c]]></dc:creator>
		<pubDate>Mon, 27 Jun 2022 11:35:38 +0000</pubDate>
		<guid isPermaLink="false">https://onthecode.co.uk/?p=3024#comment-8426</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-6542&quot;&gt;Ciprian&lt;/a&gt;.

use pdf._worker.getPage() to fix the issue]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-6542">Ciprian</a>.</p>
<p>use pdf._worker.getPage() to fix the issue</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sajan		</title>
		<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-7559</link>

		<dc:creator><![CDATA[Sajan]]></dc:creator>
		<pubDate>Thu, 17 Feb 2022 08:46:02 +0000</pubDate>
		<guid isPermaLink="false">https://onthecode.co.uk/?p=3024#comment-7559</guid>

					<description><![CDATA[Thank you for the detailed tutorial.  

I am facing issue in : 
countPromises.push(textContent.items.map((s) =&#062; s.str).join(&#039;&#039;));
&#039;s.str&#039; throws error - &quot;Property &#039;str&#039; does not exist on type &#039;TextItem &#124; TextMarkedContent&#039;.
  Property &#039;str&#039; does not exist on type &#039;TextMarkedContent&#039;.&quot;

Any help would be appreciated.]]></description>
			<content:encoded><![CDATA[<p>Thank you for the detailed tutorial.  </p>
<p>I am facing issue in :<br />
countPromises.push(textContent.items.map((s) =&gt; s.str).join(&#8221;));<br />
&#8216;s.str&#8217; throws error &#8211; &#8220;Property &#8216;str&#8217; does not exist on type &#8216;TextItem | TextMarkedContent&#8217;.<br />
  Property &#8216;str&#8217; does not exist on type &#8216;TextMarkedContent&#8217;.&#8221;</p>
<p>Any help would be appreciated.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ciprian		</title>
		<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-6542</link>

		<dc:creator><![CDATA[Ciprian]]></dc:creator>
		<pubDate>Thu, 24 Jun 2021 09:17:40 +0000</pubDate>
		<guid isPermaLink="false">https://onthecode.co.uk/?p=3024#comment-6542</guid>

					<description><![CDATA[Hi,
I tried to use the code in the article, and ng serve throws an error related to _pdfInfo and getPage, saying that they do not exist on type PDFDocumentLoadingTask.

Could you give any suggestions on how to fix that?

Thanks]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
I tried to use the code in the article, and ng serve throws an error related to _pdfInfo and getPage, saying that they do not exist on type PDFDocumentLoadingTask.</p>
<p>Could you give any suggestions on how to fix that?</p>
<p>Thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Umut Esen		</title>
		<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-4152</link>

		<dc:creator><![CDATA[Umut Esen]]></dc:creator>
		<pubDate>Thu, 28 May 2020 19:31:46 +0000</pubDate>
		<guid isPermaLink="false">https://onthecode.co.uk/?p=3024#comment-4152</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-1986&quot;&gt;Igor&lt;/a&gt;.

You would need to save it somewhere accessible via a URL, for example to a backend server. Then pass the URL to pdfjs to read, good luck!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-1986">Igor</a>.</p>
<p>You would need to save it somewhere accessible via a URL, for example to a backend server. Then pass the URL to pdfjs to read, good luck!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Igor		</title>
		<link>https://onthecode.co.uk/blog/parse-pdf-documents-in-angular-with-pdfjs#comment-1986</link>

		<dc:creator><![CDATA[Igor]]></dc:creator>
		<pubDate>Fri, 03 Apr 2020 16:12:41 +0000</pubDate>
		<guid isPermaLink="false">https://onthecode.co.uk/?p=3024#comment-1986</guid>

					<description><![CDATA[Hi! How can I get the file in the form?]]></description>
			<content:encoded><![CDATA[<p>Hi! How can I get the file in the form?</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
