Questions tagged [pdf]

12927 questions
1

votes
1

answer
694

Views

Apache POI exception

I need to convert a docx to a PDF and I am going with Apache POI. This is my POM: org.apache.poi poi 4.0.0 fr.opensagres.xdocreport org.apache.poi.xwpf.converter.pdf 1.0.6 org.apache.poi poi-ooxml 4.0.0 org.apache.poi poi-ooxml-schemas 4.0.0 For some reason, I am getting an exception during when th...
Estevao Santiago
1

votes
3

answer
56

Views

How do I extract tables from a historical PDF?

I need to extract data from similarly formatted tables from this file. There are some OCR errors but I have an automated method to correct them. I have tried: ABBYY Finereader table detection. Tabula table extraction Camelot table extraction Custom python code The Problem: The commercials tools ar...
FBB
1

votes
2

answer
112

Views

Export To Pdf angular 6

I want to export my HTML page into pdf using angular 6. I have written following code to convert into pdf let dataPdf = document.getElementById('contentToPrint'); const pdf = new jspdf('p', 'pt', 'a4'); pdf.addHTML(document.getElementById('contentToPrint'),()=>{ pdf.save('web.pdf'); }); Getting Foll...
Harshit kyal
1

votes
2

answer
33

Views

NullPointerException when getting Page Information

I need to detect the page orientations of my PDF document. Doing so I'm trying to get the page sizes of the single pages: pdfGen = createPdf.makePdf('doc.pdf'); document = pdfGen.getDocument(); document.setMargins(80, 80, 80, 80); writer = pdfGen.getWriter(); document.add(new Paragraph('some content...
user1170330
1

votes
1

answer
34

Views

Python Django PDF Flattening of Form Fields

I have a project where I need to fill out pre-made PDFs and the most logical solution that comes to mind to accomplish this is to make the pre-made PDFs into PDF forms so there are tags where input values are supposed to go, then I can look through the form tags in the PDF and line them up with a di...
ViaTech
-2

votes
0

answer
12

Views

How to figure out a math formula

I am tasked with creating a javascript for a PDF. It is for a rental company. I am to copy a calculator that already exists in a PDF. Here is my problem. I have contacted the company that has the calculator and request how a certain formula works. They weren't sure because they paid to have it devel...
Husbandman
1

votes
2

answer
8.9k

Views

How to open password protected pdf using itext

I am using iText library to read PDF files. It's working fine for all the pdf files, except for password protected ones. I used some way by using the overloading constructor of PdfReader class PdfReader reader = new PdfReader('locked pdf file','password'.getBytes()); But it is showing show error lik...
0

votes
0

answer
4

Views

How does PDF to Postscript conversion work?

I understand the basic process of PS to PDF conversion. The PS is a program that draws, so the PS interpreter runs the program and draws the object, then renders those objects into the PDF envelope. How does this process work in reverse? Is the basic idea to treat each object element in the PDF file...
Tyler Durden
0

votes
0

answer
6

Views

Out of memory when creating multiple PDFs using excel vba

I am creating several hundred reports within excel and saving them as PDF. If I remove the save to PDF routine it will go through all reports. When I add the routine back in it is very flaky, sometimes making it to 20 sometimes to 60 and every now and then though all 250. When it errors out is gives...
Rick Fromm
0

votes
0

answer
7

Views

Copy only necessary objects from PDF file

I've got huge pdf file with more than 100 pages and I want to separate them to single pdf files (containing only one page each). Problem is, that podofo does not copy just the page, but whole document because of the references (and so each of the 100 pdf files have same size as 100 page-pdf). Releva...
Filip Kočica
0

votes
0

answer
7

Views

How to hide the conversion process from the user

In the excelWorkbook.ExportAsFixedFormat line, excel is converted to pdf. Accompanied by a conversion progress popup. How can I hide this process from the user? public void ConvertExcelToPdf(string fileName) { Excel.Application excelApplication = new Excel.ApplicationClass(); excelApplication.Scree...
LiVa
1

votes
2

answer
1.8k

Views

PHP fopen can not read file if called with cronjob [duplicate]

This question already has an answer here: Crontab - Run in directory 1 answer I have a php script that sends out a email report with an attached pdf document. I use fopen. If I call the php file manualy it works without any problems and the mails are beeing send as expected. But: If the same file s...
Gregor Meier
1

votes
1

answer
1.6k

Views

How to generate layered pdf file using PdfBox?

I have a problem with generating a layered pdf page using PdfBox. I have seen several posts here on the subject, but they focus on importing pages from another pdf to a target document. My case is a liitle bit different (at least I think so :) ). I created a class MapImage that contains the paper si...
Marcin Roguski
0

votes
0

answer
2

Views

Automatically put many SVGs into single PDF, each on a single page

I want to make available about 2000 graphics (emojis) for Latex users. They are all in individual SVG files (about 1–10 KByte) with square aspect ratio originally, but there is also an automatically generated spritesheet containing them all as s. Since the sheer number exceeds some limits (e. g. G...
Crissov
1

votes
1

answer
216

Views

iText diacritic characters such as D̂, M̂ and so on not displayed correctly on PDF

I'm having a problem with iText when I'm trying to create a PDF that contains characters like the ones in the title. What happens is that the accent circonflexe does not sit properly above the letter but rather right next to it or (depending on what font I use) somewhat 'merged' into it (see screen...
Neuromancer
1

votes
3

answer
2.6k

Views

Chrome blocks a Blob object when downloading as PDF

I have created a small piece of script that calls an API to get a PDF and sends the responseType as arraybuffer. Using this I create a new Blob and set the type as 'application/pdf' To force this to download I create an anchor element, pass it the blob and click it. This works fine locally and on ot...
Scott Francis
1

votes
1

answer
1.5k

Views

ghostscript downsampling of pdf images, downsample factor error

I issue the following command: gs \ -o downsampled.pdf \ -sDEVICE=pdfwrite \ -dDownsampleColorImages=true \ -dColorImageResolution=180 \ -dColorImageDownsampleThreshold=1.0 \ And get the following errors: Subsample filter does not support non-integer downsample factor (1.994360) Failed to initialise...
Admiral Tso
2

votes
2

answer
125

Views

How to use rendered template in creating a pdf

Ok so I am Go Lang with the Echo framework, to try and build pdf which will load data from a database source - that bit will come later. So this is how I am rendering my pdf html layout, func (c *Controller) DataTest(ec echo.Context) error { return ec.Render(http.StatusOK, 'pdf.html', map[string]int...
C0ol_Cod3r
0

votes
1

answer
28

Views

Save multiple R ggplots ecdf par page into a pdf file with mapply

I compare the empirical CDF of a variable with 3 theoretical CDF. I do this for 150 variables and want to print out the result in a single PDF file with 4 charts per page. I do not use a loop but mapply instead. Ideally, I could use par(mfrow=c(2,2)) but I think this works only for R base objects an...
Bertrand G
1

votes
2

answer
2.6k

Views

zoom in and zoom out in ng2-pdf-viewer

am using ng2-pdf-viewer to show pdf files in my app.
Sony Khan
1

votes
1

answer
287

Views

MathJax + mPDF SVG Equations not visible

I've got a problem with converting MathJax SVGs to PDF using mPDF. HTML is just a simple formula from mPDF example: \[ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \] wich should be rendered as: But of course on final PDF file there's...
Kamil Weber
1

votes
2

answer
942

Views

How to convert docx to PDF in r?

I want to ask if it is possible to convert text files such as word document or text document to PDF using R ? I thought of converting it to .rmd and then to PDF using this code require(rmarkdown) my_text
Mouna Jmii
1

votes
3

answer
1.5k

Views

How to use pdfviewer to Display PDF from Firebase in Android Studio

I am making an app that lets the user upload PDF files and then I save them to Firebase. Now I'm trying to display them in my app, I don't want to let the user download the file, but I want it to be displayed directly in the app. This is how I save the files: private void uploadFile() { progressBa...
Teodora Mustea
0

votes
0

answer
8

Views

How to load picture onto Python script and subsequently print it on PDF with ReportLab

Currently, I am creating a huge number of plots with R which I currently manually drag&drop onto a ppt-document which I then turn into a PDF. I would like to automate this process using Python and have been looking into PIL and ReportLab. I wrote the following code: # import packages from reportlab....
Andreas G.
0

votes
0

answer
4

Views

Tika incorrectly adding newlines to pdfs

I found a problem while parsing PDF documents sent to a web service for NLP. We're using Tika 1.19.1 for the plain text extraction. Some people write their documents incorrectly or wrongly punctuated (in fact, most people who use our service forget to add a dot at the end of paragraphs), so we consi...
DGoiko
0

votes
0

answer
4

Views

PDF Accessibility | 'Title - Failed' Error in Acrobat Pro in PDF generated using XSL-FO

I'm creating a PDF file from XML using Apache FO. When I run an accessibility check on this file using Acrobat Reader Pro DC (version 2019.010.20098) the report indicates 'Title - Failed'. When I look at the document's metadata in Acrobat (File --> Properties --> Description tab) I can see that the...
Keith Harrison
0

votes
0

answer
4

Views

Open a PDF existing file then save it in to a specific folder in VB.NET

I have existing code here but it shows immediately a save as dialog so it is quite confusing for some users. Hope you could help Dim write As StreamWriter SaveFileDialog1.Filter = 'PDF Files |*.pdf' SaveFil`enter code here`eDialog1.ShowDialog() write = File.AppendText(SaveFileDialog1.FileName) writ...
Kasharsharan
0

votes
0

answer
3

Views

Pass Value from MS Access to Adobe Acrobat DC

I am creating a database application that will allow users to select a road number from a form in Microsoft Access and open a map to display the road on that form. So far, I have a form that has a button that when clicked, opens a Modal-Dialog form that displays a web browser control that displays t...
1

votes
1

answer
26

Views

Acrobat nor any other pdf viewer won't print connected line annotations

Similar to this problem, however the solution does not work. Adobe Acrobat Reader doesn't print my drawing on a PDF I use a Boox Max Carta to write and annotate pdf works. The annotations are exported from the e-reader as pdf annotations (comments) of the category connected lines. Here is an example...
EdL
1

votes
1

answer
31

Views

Tag content in pdf

I have a pdf which looks like below. I would want to tag the paragraph as 'paragraph'. I have searched a lot about this, and there are ways to create a tagged pdf from scratch, or convert html content to tagged pdf, but I have not had success in tagging an existing pdf. Given the coordinates can I t...
SuperNova
0

votes
0

answer
4

Views

Detect missing\corrupt Unicode Mapping in PDF

While extracting text from some PDFs PDFBox returns gibberish. This is because of missing\corrupt unicode mapping. I can see following warnings on the console. I want to be able to detect this to be able to flag these PDFs as corrupt. Looking for a solution that is better than parsing logs. Thanks...
Magpies3
1

votes
1

answer
2.2k

Views

Calculating the maximum string length that fits in a PDF's form textbox using iText [closed]

I'm using iTextSharp to populate some PDFs containing forms. These forms consist of textboxes (among other field types) and if I open them in a PDF reader, I can type in arbitrary number of characters without any limitations. But if I print such a PDF form while I entered too many characters in a fi...
Mehran
0

votes
0

answer
3

Views

Flattening Form fields removes content

I try to flatten form fields (PDAcroForm.flatten()) in a pdf which in the step before got filled from an .xfdf file. The expected result is to have the editable boxes replaced with just the text. However I from the PDF where the text is filled in the form (output02.pdf) after flattening, all added t...
luckydonald
1

votes
3

answer
2.3k

Views

Puppeteer wait until page is completely loaded

I am working on creating PDF from web page. The application on which I am working is single page application. I tried many options and suggestion on https://github.com/GoogleChrome/puppeteer/issues/1412 But it is not working const browser = await puppeteer.launch({ executablePath: 'C:\\Program Files...
n.sharvarish
0

votes
0

answer
3

Views

How to print markup code in RStudio to pdf

I created a table in RStudio using qwraps2 markup code. Is there a way to print this table in basic table format directly to PDF to be used for powerpoint/email/elsewhere? I am not interested in using it for html, website, php, etc. Only to use as email-able table.
ClareFG
1

votes
3

answer
5k

Views

I'm using html2pdf to generate a pdf, can I hide the html so the user doesn't see it?

I'm generating vouchers using the html2pdf library. This works fine with the voucher showing as HTML in the page. I have a button that triggers the html2pdf() function on click, prompting the user to accept the PDF download. I would like for the HTML to not show on the page. I tried applying positio...
Brachamul
1

votes
2

answer
2k

Views

PDF downloads surrounded by single quotes?

I am having a problem with setting up PDF download in Mozilla or Internet Explorer, as you probably got from the title. If I attempt to download something.pdf for whatever reason it becomes 'something.pdf' with the single quotes on the outside, and this of course makes it impossible to read because...
Christopher M
1

votes
2

answer
3.1k

Views

Uncaught Mpdf\MpdfException: The HTML code size is larger than pcre.backtrack_limit 1000000

I am developing code to generate PDF from HTML code using library MPDF. For HTML Code I am reading from external HTML file. But its not working for larger HTML code size. Is there any way to fix it or do we have any other library which supports my functionality. For larger html file giving error: Fa...
Satya Mahesh
1

votes
1

answer
3.9k

Views

How to convert HTML to Pdf with OpenPdf

How can I convert an HTML to PDF with OpenPDF? For what I know, OpenPdf is a fork of Itext 4. Unluckily I can't find Itext 4 documentation.
Marco Sulla
1

votes
1

answer
3.1k

Views

Download as PDF from a JSON post response data in angular 4/5

Latest code::: convert() { const doc = new jsPDF(); // tslint:disable-next-line:max-line-length const col = ['DischargeDate', 'Case Number', 'Patient Name', 'Hospital Name', 'Payor', 'Total Doctor Fee', 'To be Collected']; const rows = []; /* The following array of object as response from the API r...
Nancy

View additional questions