Questions tagged [pdf-conversion]

Relating to converting between Portable Document Format and other file formats. Questions asking us to recommend or find a conversion tool or library are off-topic.

This tag is for questions relating to programmatically converting to and from the open standard file format . If a specific conversion is involved, the appropriate tag should also be used: etc.

Conversion solutions may range from complete rasterization (and graphic embedding) to intense . The middle ground generally converts at a high enough level to recognize and use text attributes where possible, falling back to graphic rendering only when necessary.

Questions asking us to recommend or find a tool, library, documentation or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.

232 questions
93
votes
2 answers

How to Use pdf.js

I am considering using pdf.js (an open source tool that allows embedding of a pdf in a webpage). There isn't any documentation on how to use it. I assume what I do is make an html page with the script referenced in the header, and then in the body,…
Chris
  • 1,783
  • 3
  • 18
  • 26
32
votes
3 answers

ImageMagick convert pdf to jpeg has poor text quality after upgrading ImageMagick version to 6.7.8

After upgrading ImageMagick text quality got degraded when convert pdf to jpeg: Old image New Image Conversion command: convert foo.pdf foo.jpeg Old ImageMagick version: [root@home]# convert -version Version: ImageMagick 6.2.8 05/07/12 Q16…
Kuf
  • 15,678
  • 4
  • 61
  • 85
24
votes
8 answers

How to convert a PDF to grayscale from command line avoiding to be rasterized?

I'm trying to convert to grayscale this PDF: https://dl.dropboxusercontent.com/u/10351891/page-27.pdf Ghostscript (v 9.10) with pdfwrite Device fails with a "Unable to convert color space to Gray, reverting strategy to LeaveColorUnchanged."…
Panda
  • 265
  • 1
  • 2
  • 7
9
votes
9 answers

Convert HTML to PDF in ASP.NET MVC

Im working in a project which requires current html page to convert in pdf and that pdf will automatically save on button click on server and its reference will be save in database.I can convert the view if its data comes from data base but the…
Rameshwar Trivedi
  • 359
  • 1
  • 2
  • 11
7
votes
3 answers

Office documents to PDF

I have seen a couple threads about this, but am not getting very straight answers in my searching. I have a web application that needs to take in doc, docx, xls, xlsx files and convert them into PDF. Right now we have a process that uses the…
Justin Rassier
  • 888
  • 12
  • 26
7
votes
1 answer

Convert HTML file to PDF file using ITextSharp

I'd like to accomplish the following: Given the path name of an html file, and the desired pathname of a pdf file, convert the HTML file to PDF using ITextSharp. I've seen plenty of code samples which do close to this but not exactly what I need. …
Ben
  • 1,888
  • 9
  • 25
  • 38
7
votes
1 answer

PHP - Laravel - Convert Docx to PDF

How to convert a document (docx) to pdf using PHP Laravel? Before converting this, I'm using PHPWord for set variables, and after that, I want to save it or convert it to PDF.
DandyF
  • 79
  • 1
  • 2
6
votes
0 answers

Converting PDF to Text Without the wrapping line breaks

I have thousands of PDF files that I need to convert into txt files, but I need to preserve the original line breaks, let me give an example to better explain. The files are in this format (example A) 1. Lorem ipsum dolor sit amet, consectetur…
daxter1992
  • 448
  • 3
  • 10
6
votes
2 answers

Converting docx to pdf via JODConverter and LibreOffice causes error

I have 1000 .docx files that I want to convert to pdf so I have written a program to do this, but I can never get through all 1000 files before an error is thrown. I start a headless version of LibreOffice using soffice --headless…
Jason Pather
  • 1,089
  • 1
  • 12
  • 17
6
votes
2 answers

ExpertPdf - Could not get conversion result header. Data receive error. Could not receive data. Error code: 109

I am using ExpertPdf *HtmlToPdf* library. When I try to AddElement to PdfPage I get an exception: "Could not get conversion result header. Data receive error. Could not receive data. Error code: 109". I have no idea why is that. Code below: PdfPage…
Mark
  • 71
  • 1
  • 4
5
votes
2 answers

Unable to get Bold text using HTML to PDF converter from Select.Pdf

I'm trying to get my text bold in PDF. I am using HTML to PDF converter from Select.Pdf (C#). http://selectpdf.com/ I have included text style() in html but eventually it is not working. I have also tried adding strong tag and b tag in HTML. But no…
5
votes
0 answers

Spire.PDF Load Binary PDF Data into PdfDocument

I'm working in C# with Spire.PDF. Specifically, my goal is to load binary PDF data from a database into a Spire.Pdf.PdfDocument object. According to this documentation, I should be able to use the LoadFromStream() method or some unspecified method…
Scotty H
  • 5,646
  • 3
  • 27
  • 78
5
votes
1 answer

PDF to Excel conversion putting each pdf page in a different worksheet

I am attempting to convert a pdf file (with 16 pages) to an excel file in order to run a program I already have in place in excel. I have a code that converts the pdf to excel already, but I would like the macro to put each separate page of the pdf…
Mike
  • 269
  • 6
  • 10
  • 18
4
votes
1 answer

How to deal with unicode character encoding issues while converting documents from PDF to Text

I am trying to extract text from a PDF. The PDF contains text in Hindi (Unicode). The utility for extraction I am using is Apache PDFBox ( http://pdfbox.apache.org/). The extractor extracts the text, but the text is not recognizable. I tried…
4
votes
0 answers

Export Flash Frame as PDF

I'm looking for a toolkit/command line/library that will let me export frames or a single frame of a .swf to a pdf. I'd rather not have to write my own converter. I'm looking for a vector solution...not bitmap. There is a Swftools thread on…
Eugene
  • 9,015
  • 18
  • 58
  • 86
1
2 3
15 16