Questions tagged [pdf]

16921 questions
1

votes
1

answer
550

Views

Right Alignment of numerical value in PDF using Apache PDFBox library

My Spring boot Java application is using apache pdf box library {version 2.0.6} for generating pdf. I want decimal values to be right aligned. It means all decimal dot should align in same vertical line. I also attached screenShot. stream.beginText(); stream.newLineAtOffset(xCordinate, yCordinate);...
1

votes
2

answer
1.7k

Views

Dompdf not generating pdf properly from SVG

I am having trouble generating pdf keeping design with SVG content. SVG is linked inside html, and using html to generate pdf. But not working properly. This is the code: $dompdf = new DOMPDF(); //HTML Content $html = setPaper('A4', 'portrait'); $dompdf->set_option( 'isRemoteEnabled', true ); $dompd...
тнє Sufi
1

votes
1

answer
1.3k

Views

R merge pdf into one pdf

I have a folder which contains around 400 .pdf files, each .pdf file is 2 pages total. All .pdf file names are under the following format: 148-c16631-27-02-2018.pdf What I would like is to merge under one pdf file, the pdf files that have a certain code in the file name in R. For instance: 148-c166...
KRStam
1

votes
3

answer
54

Views

How to export an xtable as PDF directly via R script?

I have a data.frame that I need as a nice PDF table for a scientific poster. While it's very easy to export plots via pdf(), I'm stuck with this table. I know how to get a PDF table with rmarkdown, e.g. --- output: pdf_document --- ```{r tab, echo=FALSE, results='asis'} library(xtable) xtable(head(...
jay.sf
1

votes
1

answer
56

Views

Convert a Smart Form into PDF in an Xstring variable

I have to generate a Smart Form in PDF format. I have to save this output (in any possible format which I would say is type either string or xstring) in a Z table so it can be generated again without the processing. Could you please clarify if there is any way of saving the Smart Form PDF in xstrin...
Nil
1

votes
2

answer
1.4k

Views

How to plot chinese characters on pdf?

My question is related to my previous question. How to plot bar plot with Chinese names in input file? I need to plot now chinese characters on pdf. mydata = matrix( c( 2:6, c( 2,4,2,6,3 ) ), nrow= 2 ) mylabs = c( '木材', '表', '笔', '垃圾桶', '杯' ) barplot( mydata, beside=T, horiz= 'T',...
Manish
0

votes
2

answer
119

Views

pdf2image how to read pdfs with “enable all features” - windows

I have a pdf and i would like to read it in Python. When I open it on my machine using acrobat, I get below message and when I click on 'enable all features', the file shows it's actual content. When I try to read it in python, how could I achieve the same action so that python reads the actual tex...
user2543622
0

votes
0

answer
25

Views

How to move PDF files from a parent folder to a subfolder which has the same name as the file

I am working on a project which sends PDFs from a Wordpress website to a Google Drive. The files are PDFs of people who registered for certain events, which are held in certain cities. These PDFs are all sent to a parent folder 'registrations'. What I need to achieve is to automatically send these P...
user3588669
1

votes
2

answer
9.8k

Views

Add image to cell - iTextSharp

I'm trying to add image to pdf cell and I got an error: Argument 1: cannot convert from 'System.Drawing.Image' to 'iTextSharp.text.pdf.PdfPCell' in line: content.AddCell(myImage); Here's my code: PdfPTable content = new PdfPTable(new float[] { 500f }); content.AddCell(myImage); document.Add(content)...
Cieja
0

votes
0

answer
5

Views

How to convert from BLOB to PDF using Buffer in node.js

I am writing a HTML based user gui that will be able to upload a Quotation to blob in my sql and when you retrieve it via a get function, it must do a database lookup and send the pdf. In the console log I can see that it is projecting the buffer, but I cannot display it on the html page as a pdf,...
wimpie smith
0

votes
0

answer
6

Views

Python: PDF: How to read from a form with radio buttons

I have created a form with some radio buttons, following the examples from Creating Interactive PDF Forms in ReportLab with Python Here is code example esp. for radios: simple_radios.py from reportlab.pdfgen import canvas from reportlab.pdfbase import pdfform from reportlab.lib.colors import magenta...
ProfP30
0

votes
0

answer
5

Views

How to extract sub-chapters from pdf documents in R (using the TOC)?

I'm extracting text from pdf documents in R. I have pdf documents with embedded tables of contents (TOCs) which have many sub-chapters like 2.31.1.2 etc. For later text processing, I want to create a data frame where each sub-chapter is treated as a vector of the df. Now my question is: Is there a w...
Sophie
1

votes
2

answer
13.9k

Views

How to read the pdf file using selenium

I am working on web page over which there is a link, clicking on which it opens a pdf file on new window. I have to read that pdf file to validate some data against the transactions done. One way is to download that file and then use it. Can any one help me out on this. I have to work on IE 11 Tha...
Bugasur
0

votes
0

answer
22

Views

PDF File Zip in Memory Stream Showing not supported file or damaged My Code attached

I have pdf file in directory that can be open successfully. I am actually changing into byte[] and zip it in memory stream and return it. I got all files as zipped but when i am opening files getting error 'File can not be open either it has not supported type or file is damage' I am changing pdf f...
Doc
1

votes
2

answer
914

Views

Stargazer output appears below text - rmarkdown to pdf

The Problem When using rmarkdown in RStudio, my stargazer(glm()) output gets positioned below the text that I would like it to. It gets positioned in a different spot than the r chunk is. The PDF is created perfectly, it's just the position of the stargazer output that is a problem. Background I am...
MillionC
1

votes
1

answer
484

Views

Extract Pages from a PDF using itextsharp in Powershell

I have been researching this for weeks now and can't seem to make much ground on the subject. I have a large PDF (900+ pages), that is the result of a mail merge. The result is 900+ copies of the same document which is one page, with the only difference being someone's name on the bottom. What I am...
fodelement
1

votes
2

answer
416

Views

How to embed a PDF in an HTML page?

I need to embed a PDF file in an HTML page for the users to see it on every major device. Most of the approaches work fine on desktop but they start to show problems on iPad devices. The PDFs are no longer scrollable if placed inside an iframe or embed tag. I used the following techniques to overcom...
writeToBhuwan
1

votes
2

answer
270

Views

iOS PDFKit will not write

import UIKit import PDFKit class ViewController: UIViewController { @IBOutlet weak var pdfView: PDFView! lazy var pdfDoc:PDFDocument? = { guard let path = Bundle.main.path(forResource: '6368', ofType: 'pdf') else {return nil} let url = URL(fileURLWithPath: path) return PDFDocument(url: url) }() over...
headache
1

votes
2

answer
43

Views

Total number of pages in a PDF document

MATLAB provides the extractFileText function which allows us to read text from PDF files, among other file formats, and save the extracted text as a string. We can pass an extra argument to this function in order to extract text from specific pages of the document. For example, to extract the text f...
codeaviator
1

votes
1

answer
31

Views

How to get page size of a pdf bytearray with plain java code?

I have a bytearray of a pdf document. Is it possible(without using any external libraries) to get to know how many pages the pdf contains? Is it possible with only the use of java8? I find it rather stupid that I have to import a whole pdf external library in my project for just getting to know the...
Bladerunner
0

votes
0

answer
2

Views

Want to extract the link annotations and replace the text for the annotation link

I have a pdf which has links to internal or external resources, I am able to extract all the links in the pdf but i have issues with extracting exact text which the link is linked/referred to and modifying the text which has the link linked to.
Mr Jack
1

votes
1

answer
13.4k

Views

Searching words in PDF and Extracting it using iText in android

I recently downloaded iText 5.3.3 and i'm having a bit of a trouble using it. What classes do i use to Search Words and Extract them from the PDF and display the text in Android? I have seen the class PdfTextExtractor, i want to know in the class there is a method with a parameter of TextExtractio...
Christian
1

votes
2

answer
1.8k

Views

Validation of files based on their file extensions

I get files from queues in Java. They may be of following formats. docx pdf doc xls xlsx txt rtf After reading their extensions, I want to validate whether they are actually files of these types. For example, I got a file and checked that it has extension .xls. Afterwards, I want to check whether it...
Ahmad
1

votes
1

answer
35

Views

Downloading a pdf based webpage as pdf using Python

Here is given a method to download a webpage as pdf, which works. However, the website I am interested in is also displaying a pdf itself, so this method does not work. For example, this page. Is there anything specific for such url's? When I use the post I shared above, I get the following error:...
aslv95
0

votes
0

answer
6

Views

PDF dosen't show in emacs on MacOS

I've installed packages like latex-preview-pane and pdf-tools. But it can not show in right window. enter image description here I've put this in .emacs (add-hook 'doc-view-mode-hook (lambda () (linum-mode -1) )) But it still dosen't work.
DylanYang
0

votes
0

answer
5

Views

extract text from Secured PDF

I want to extract data from secured pdf using vba. The pdf consist of password and after inserting password it shows pdf as secured pdf. I am able to open the password protected pdf but while converting pdf to txt format it does not copy the data from pdf to text due to the secured version
sunny
1

votes
0

answer
44

Views

how to display a pdf file as a download link from mysql without path directing way in php?

I tried to display pdf files from mysql in the webpage without any path directory. is it possible to do that? I tried this:
saisun7
1

votes
0

answer
83

Views

jqplot canvas into PDF using iText

Is there a way to render jqplot canvas (HTML page) into a PDF file. I am using iText7 and pdfHTML2.0.0. Currently I am converting the canvas elements into an image using DataURL but that leads to a poor resolution of image when compared to the canvas on the web page. Fiddle for webpage (with dataURL...
Sparks
1

votes
1

answer
634

Views

Python PyPDF2 counting PDF pages in scanned PDF generates Xref table not Zero indexed

I have written a fast script to count the pages in PDF files. However, in some files it cannot be read and it returns an error of Xref table not Zero indexed. Basically when expects an Object Id (5.0) and gets Object Id (4.0) for example. Also I have got with other Object Id like (7.0) and gets Obje...
TMikonos
1

votes
1

answer
143

Views

plot with ggplot in for-loop doesn´t compile to PDF

I created a report using knitR (.Rnw) to compile it as a PDF. As I would like to plot the same figure for every single questions I created a plot in a for-loop. Unfortunately I get a warning in the PDF and don´t realy get what causes the error... Here is the chunk where I believe the problem starts...
klamsi
1

votes
0

answer
89

Views

FPDF: Local saved pdfs are damaged

I've got a project where we output some data as pdf in the browser. The user also can download the pdf directly. If we run the project on our local machine the pdf creation and the view works without problems. But if we put the project online we've got a problem that the pdf which is generated by F...
Florian Bader
1

votes
0

answer
1.3k

Views

Convert DOC [HWPFDocument] to pdf [with font and images] using java

converting doc file to pdf I am using the following code : POIFSFileSystem fs = null; Document Pdfdocument = new Document(); fs = new POIFSFileSystem(new FileInputStream(srcFile)); HWPFDocument doc = new HWPFDocument(fs); WordExtractor we = new WordExtractor(doc); PdfWriter writer = PdfWriter.getIns...
Kishan C S
1

votes
3

answer
3.5k

Views

How to generate PDF from an html page

I have a form which is displayed using my custom plugin. Below given is code to display form using plugin: $question = $wpdb->get_results('SELECT * FROM $table_name1 WHERE group_id=$id'); $instruction = $question[0]->instructions; $html = 'Instructions'.$instruction.'Download'; $arr_size = sizeof($...
Sandra
1

votes
1

answer
486

Views

Pentaho CDE - Export dashboard to pdf/excel format

I need to export my dashboard CDE (Pentaho 7.1) to pdf/excel format. By default Pentaho seems do not export CDE dashboards, but googling a little bit on this I found some post with export just of table or graph of the dashboard. Please can anyone help me? I would like export entire dashboard to pdf/...
Ema
1

votes
0

answer
170

Views

How to allow pdf files in .htaccess?

I have this following codes in my htaccess file, but it doesn't allow pdf file to open, it will redirect to 404 page. how can I allow pdf files to open based on my following htaccess file. RewriteEngine on RewriteCond $1 !^(index\.php|images|public|assets|uploads|themes|updates|asset|mob|robots\.tx...
Jona
1

votes
1

answer
1.1k

Views

Itext 7 - PdfReader is not opened with owner password Error

I am using This example for the latest Itext7 to fill in a document and I am getting this error: iText.Kernel.Crypto.BadPasswordException: PdfReader is not opened with owner password So I looked around the net I found that some people found solution to this error using PdfReader.unethicalreading =...
Ahmad
1

votes
0

answer
21

Views

Is it possible to have a pdf slideshow inside a <div> or <embedded>?

I have a pdf with multiple pages that I want to display and change page automatically inside my main page 'index' I don't want a full screen option. My main goal is to create a dashboard with several information in a single webpage and screen. This link: https://codepen.io/gabrieleromanato/pen/dImly...
Alberto Rocha
1

votes
1

answer
106

Views

pdf not showing in ashx when response content type is pdf

I have an application that shows pdf files on browser, it works fine with most files but some give me an error, I commented the line that specifies the content type and it worked but I don't know why and I can't check every pdf file because there are millions. pdf files are not corrupted. Can somebo...
Christrian BP
1

votes
0

answer
431

Views

How to display base64 PDF string in webview?

I'm developing an android app where I have to display base64 string file into WebView but I'm getting base64 String from the server. I tried some SO answers but I'm unable to set the base64 string(pdf) into WebView. I tried below loc. String urlString = getIntent().getStringExtra('base64String'); St...
A.R.
1

votes
0

answer
2.2k

Views

Convert Pdf File path to Base64 String

I am trying to convert my pdf file to Base64 string as like below public static String convertFileToByteArray(File f) { byte[] byteArray = null; try { InputStream inputStream = new FileInputStream(f); ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] b = new byte[1024 * 11]; int bytesR...
Jyoti

View additional questions