pdf

Extract text from pdf converted from webpage using Pypdf2

狂风中的少年 提交于 2020-06-29 04:34:38
问题 I used chrome to convert a webpage into Pdf using save as pdf option. Now the problem is that when I extract the data from it using PyPDF2, it shows Null whereas it works on other pdf files easily. I know that I can extract data directly from the website but I want to understand why this is not working. It shows the correct number of pages but when I extracttext(), it shows nothing. Does anyone know what is the problem? The link to the page is https://en.wikipedia.org/wiki/Rapping. I

How to hide Validity unknown symbol after signing the PDF in iTextSharp

我的未来我决定 提交于 2020-06-29 04:13:08
问题 I have created a signed PDF using iTextSharp in C# .Net. In the signed PDF I want to have a validity symbol so that when a user opens it in Adobe Reader it shows a green tick mark along with its signature. But in my web application (a html page with canvas) I want to remove that question mark from the PDF so that it does not show like in this screen: So I want to keep the original bytes of the PDF in which signatureappearance.Acro6Layers = false; is added in code to get this symbol. But

How to load and present a PDF file from the web in Flutter

坚强是说给别人听的谎言 提交于 2020-06-29 04:06:50
问题 I'm trying to fetch a PDF file from a URL, and to present it in my Flutter app (for both Android and iOS). I've searched the web and SO for answers on how to present a fetched PDF file in Flutter, but all I could find was how to present a locally pre-added PDF file. I've also searched for packages doing the same, but I couldn't find one that worked. Example : I'm trying to fetch this PDF file for example, and to present it inside a Flutter widget screen in my app. Does anyone know how can I

Add revocation information to signature using iText7

梦想的初衷 提交于 2020-06-29 03:35:37
问题 I am producing Long Term signature. I am trying to add revocation information (Crls, OCSP Responses, Certificate Chain) to the signature as an unsigned attributes but the revocation information is not been embedded in the final signature. Following is the code snippet: Stream outputStream = new MemoryStream(); List<byte[]> ocspCollection = new List<byte[]>(); List<byte[]> crlCollection = new List<byte[]>(); List<byte[]> certsCollection = new List<byte[]>(); Stream readerStream = new

Add revocation information to signature using iText7

对着背影说爱祢 提交于 2020-06-29 03:34:07
问题 I am producing Long Term signature. I am trying to add revocation information (Crls, OCSP Responses, Certificate Chain) to the signature as an unsigned attributes but the revocation information is not been embedded in the final signature. Following is the code snippet: Stream outputStream = new MemoryStream(); List<byte[]> ocspCollection = new List<byte[]>(); List<byte[]> crlCollection = new List<byte[]>(); List<byte[]> certsCollection = new List<byte[]>(); Stream readerStream = new

I am using pdf_viewer_plugin and in Android Studio I have no problem, but when I build APK and try to view the PDF from the APP, the APP crashes?

岁酱吖の 提交于 2020-06-28 05:57:14
问题 So I am using Android Studio and Flutter to build an APP in which there is a PDF and I am using pdf_viewer_plugin: ^1.0.0+2 to preview the PDF inside the APP. When I connect my phone using cable and run the APP I have no issues what so ever to open the screen and view the PDF, but when I click on Build->APK and install the APK from the file created and go to the same screen with the PDF viewer the whole APP crashes. I can see the screen opens and even the loading indicator I have put it is

JSPDF .html() function returning blank pdf page

跟風遠走 提交于 2020-06-27 19:29:08
问题 Using the new jsPDF .html() pretty much pulled straight from their docs, but it still results in a blank page: Results in blank page: function saveDoc() { window.html2canvas = html2canvas const doc = document.getElementById('doc') if (doc) { var pdf = new jsPDF('p', 'pt', 'a4') pdf.html(doc.innerHTML, { callback: function (pdf) { pdf.save('DOC.pdf'); } }) } } Results in no PDF generated: function saveDoc() { window.html2canvas = html2canvas const doc = document.getElementById('doc') if (doc)

Rendering the whole media box of a pdf page into a png file using ghostscript

会有一股神秘感。 提交于 2020-06-27 18:24:30
问题 I'm trying to render Pdfs pages into png files using Ghostscript v9.02. For that purpose I'm using the following command line: gswin32c.exe -sDEVICE=png16m -o outputFile%d.png mypdf.pdf This is working fine when the pdf crop box is the same as the media box, but if the crop box is smaller than the media box, only the media box is displayed and the border of the pdf page is lost. I know usually pdf viewers only display the crop box but I need to be able to see the whole media page in my png

css pdf page - header overlapping with content

百般思念 提交于 2020-06-27 15:32:30
问题 As we can see from the image my content overlaps with the header image and this is the code I have: <style type="text/css" media="print"> @page { /*size:landscape;*/ @top-center { content: element(header); } @bottom-left { content: element(footer); } } div.header { padding: 10px; position: running(header); } div.footer { display: block; padding: 5px; position: running(footer); } .pagenumber:before { content: counter(page); } .pagecount:before { content: counter(pages); } </style> </head> <div

css pdf page - header overlapping with content

 ̄綄美尐妖づ 提交于 2020-06-27 15:32:12
问题 As we can see from the image my content overlaps with the header image and this is the code I have: <style type="text/css" media="print"> @page { /*size:landscape;*/ @top-center { content: element(header); } @bottom-left { content: element(footer); } } div.header { padding: 10px; position: running(header); } div.footer { display: block; padding: 5px; position: running(footer); } .pagenumber:before { content: counter(page); } .pagecount:before { content: counter(pages); } </style> </head> <div