Skip to main content
21,091 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
24 votes
0 answers
2k views

Implementing PencilKit with PDFKit

My app shows PDF files using the PDFKit and lets users make annotations on pdf files through my own code using UIKit and CoreGraphics frameworks. Since I would like to use the PencilKit framework to ...
Alcovi's user avatar
  • 241
15 votes
0 answers
3k views

How to remove margin at bottom of print/PDF in Chrome?

I have a simple html page (code below). The width and height of the page and elements is 1587.4px and 2245.04px respectively. These are set on the @page and elements. I'm expecting a completely red ...
robzolkos's user avatar
  • 2,286
15 votes
4 answers
9k views

pdf in iframe only first page on iphone/ipad

I am trying to display the content of a pdf with an iframe. Everything is working fine on a normal computer. However on mobile devices of apple (IPhone/IPad) only the first page of the pdf is getting ...
poza's user avatar
  • 265
14 votes
1 answer
2k views

Dynamic sized multi line TextBox field in a PDF

I have created a document in an open office with a multi-line form field: The issue I am having is when the dynamic content exceeds the initial size of the multi-line text box: Sure I can re-size ...
wal's user avatar
  • 17.7k
14 votes
2 answers
11k views

React-PDF Slow Performance with large PDF

I am using React-PDF from npm, with the PDFDownloadLink function to download a large pdf. But the PDF is being created on my app load created a long lag time. I have tried timers, lazy loading the ...
eesteban's user avatar
  • 346
12 votes
0 answers
2k views

What's the default print resolution for Google Chrome?

I'm trying to print a PDF from a Django template using headless chrome, I've designed the page for a 96DPI A4 resolution (794 x 1123), but It was too small on the printed PDF, so I've resized the page ...
Fabi0_Z's user avatar
  • 195
11 votes
0 answers
1k views

Error: `export_graph()` REASON: * The graph object is not valid

I want to export graph to pdf in R, with the model of xgboost. Unfortunately, I get the error in the title. I followed the official advice to solve it, but it didn't work. Anybody know about this? ...
user5824405's user avatar
11 votes
0 answers
3k views

How to convert a UIView to a multi-page PDF in swift?

I have an app, written in Swift and want to export an entire UIView as a PDF. I found the code below does this well, but only produces a single-paged, cropped PDF. The exportable UIView contains a ...
Miles's user avatar
  • 141
11 votes
0 answers
927 views

Rotate XAxis label to 90 degree

Hi I am using PDFsharp & MigraDoc to generate column chart. I was wondering, if I can rotate the x axis labels to 90 degree so they come like vertical instead of horizontal. Does any body has any ...
user345625's user avatar
  • 4,021
11 votes
1 answer
8k views

Display PDF from a stream in a WebBrowser control

How can I display a PDF document from a MemoryStream within a WebBrowser control? I've searched around and found I can simply navigate to a PDF file using: webBrowser1.Navigate(@"C:\Temp\ExportedPDF....
Codesleuth's user avatar
  • 10.5k
10 votes
0 answers
4k views

How to customize filename in browsers builtin PDF viewer for base64 pdfs

I'm embedding PDFs from a base64 string like this: var pdfData = 'data:application/pdf;filename=MY_CUSTOM_FILENAME.pdf;base64,' + '...
Aero WuBook's user avatar
10 votes
0 answers
7k views

Use PDF vector graphics in Android Studio

I have PDF image assets from an iOS project that I need to add to an Android Studio project. Is it possible to add PDFs to Android studio, or do I have to use an external converter like Gimp or ...
jungledev's user avatar
  • 4,345
10 votes
0 answers
1k views

Compressing images in Android PDFDocument.Page

I have a document scan functionality built into a client app. The app stores documents as image archives – and a document can have 1 to n pages. A menu item is exposed to allow the user to export the ...
user avatar
10 votes
1 answer
15k views

How to get page numbers in pdf generated by html with wkhtmltopdf

Here is our answer: We are currently using wkhtmltopdf to generate a PDF from a given html template. Some background information: We are using Sulu CMF to build our back end, which is based on ...
notsure's user avatar
  • 391
10 votes
1 answer
8k views

How to set PDF file size using PdfDocument on Android

I have to convert some text and a small image into a PDF document on Android and for that I am using PdfDocument added in API 19. The thing with this is that the PDF generated by this one is about 3 ...
Cata's user avatar
  • 11.2k
10 votes
0 answers
938 views

How to calculate the checksum in an XFA form

When you save an XFA form (XFA = XML Forms Architecture) using Adobe software, a checksum attribute is added to the form element. This checksum appears to be a SHA-1 digest, but it's unclear as to ...
Bruno Lowagie's user avatar
10 votes
0 answers
921 views

Webview to PDF ignores job name

I am trying to print an HTML-page from a webview on KitKat (4.4.4) basically using the sample code provided in Google's API documentation. Accordingly, I set a print job name as follows: String ...
aqua23's user avatar
  • 101
10 votes
0 answers
1k views

Change default zoom in QLPreviewController

I am using a QLPreviewController to display PDF files, each page of which is a spread of a magazine. The default zoom of the QLPreview is to fill the screen by width. In portrait mode, the front and ...
user2844331's user avatar
10 votes
1 answer
3k views

Safari URL to PDF-page workaround?

I'm trying to link from an URL to a specific page within a PDF document being viewed using the Preview.app built in Safari (using iOS on iPad2). I know that Sarafi does not support (hopefully in the ...
MikeMaasdam's user avatar
9 votes
0 answers
2k views

"ERROR Error: write EPIPE" on AWS Lambda with html-pdf

I coded a NodeJS class which is supposed to create a PDF file out of a html string. The class is deployed on AWS Lambda. It is based on html-pdf (https://www.npmjs.com/package/html-pdf). const {...
juliusphysics's user avatar
9 votes
0 answers
6k views

Disable javascript inside embedded PDF displayed with Chrome PDF viewer

PDF that contains javascript runs this code when embedded in html and displayed in Chrome. This is better described in this closed issue https://bugs.chromium.org/p/chromium/issues/detail?id=511295 ...
jojkos's user avatar
  • 131
9 votes
0 answers
1k views

How to add PDF metadata when printing an HTML page with a browser?

I'm using HTML to generate some documents as I'm mastering the layouting much more than Latex or Word. I'm generating my HTML page and convert it to PDF by printing the page with Opera. Everything ...
letrollpoilu's user avatar
9 votes
0 answers
6k views

Can't open blob files in firefox

I want to open files sent from server on Firefox. Actually it's working on IE. Here's how I would proceed: openFile(path, fileName) { this.creditPoliciesService .openFile(path) .toPromise() ...
infodev's user avatar
  • 5,235
9 votes
1 answer
1k views

PDF: How can I override/fix searchable text in a scanned image + OCR file?

I'm trying to create an index on a PDF file that I scanned as images from an old original manuscript, then put through character recognition in Adobe Acrobat Pro. The problem is some of the words were ...
O.M.Y.'s user avatar
  • 357
9 votes
0 answers
2k views

How to convert a MS Word doc containing UTF-8 characters to PDF with Apache POI?

For some reason I cannot get the PdfConverter from Apache POI to convert my MS Word document properly on a Linux machine. On Windows and MacOS it seems to work fine but whenever I try it on a Linux ...
Tranquilized's user avatar
9 votes
0 answers
2k views

Prevent line breaks in wkhtmltopdf generated pdf

I'm using wkhtmltopdf to generate pdf files from html templates. Rest of stack is Flask with Jinja2 and pdfkit as wrapper around wkhtmltopdf. I need to generate some files containg code. There are ...
Crazy Yoghurt's user avatar
9 votes
0 answers
736 views

opening password protected PDF document and rendering in android using new "PdfRenderer" class?

In Android 5.0, Google introduced the PdfRenderer class for rendering PDFs. I tried rendering the pdf using it and it worked. However, when it comes to password protected PDF i dint find a way to open ...
frogEye's user avatar
  • 364
9 votes
3 answers
2k views

PDF Cell Vertical Alignment with com.lowagie.text

I am using com.lowagie.text to create PDF in my code. All is working fine except I am trying to align my cell content vertically. I want cell text to be in the middle of the cell height. This is my ...
Anupam Sharma's user avatar
9 votes
1 answer
2k views

Add acroform with pdfsharp

how can i add Acroforms (or any inputfields) with pdfsharp lib to a pdf? For example a textbox (PdfSharp::Pdf::AcroForms::PdfTextField) I can't find any example for this, only read/modify. I found "...
user3600403's user avatar
9 votes
0 answers
5k views

How to change (offset) page numbering in PDF

I have been using pdftk to do a lot of scripting with pdf, but I am open to anything that can be done programmatically in linux, ideally through command line or python API. I would need to change the ...
joelhoro's user avatar
  • 920
9 votes
2 answers
990 views

Context Menus in PDFs

Built into UIWebView and QLPreviewController is the ability to highlight text and present some manner of context menu to the user. While presenting the menu is the trivial part, determining the ...
CodaFi's user avatar
  • 43.3k
9 votes
2 answers
2k views

How to save a password protected PDF to a non password protected PDF

I want to print a password protected PDF so at first, I tried to convert this PDF into NSData and pass it to UIPrintInteractionController. But according to Googled results, you cannot unlock a PDF ...
user972268's user avatar
9 votes
6 answers
5k views

PDF Form Field Manipulation

I'm making a web interface to autofill pdf forms with user data from a database. The admin needs to be able to upload a pdf (right now targeted at IRS pdf forms) and then associate the fields in the ...
John's user avatar
  • 5,206
8 votes
0 answers
4k views

Add annotations to react-pdf and get coordinates of annotations with respect to pdf

I have a requirement where I have to open an existing pdf in a canvas and draw resizable and draggable rectangles in the pdf and get coordinates of these rectangles drawn. This is my code to display ...
Elaine Martis's user avatar
8 votes
0 answers
1k views

Pdf.js viewer.html not calling all range requests

I have some issues in downloading the pdf using range requests. I am using spring boot application to provide download service. viewer.html makes first request which is cancelled since service ...
Ejaz Ahmed's user avatar
8 votes
0 answers
201 views

Mendeley previous view feature for pdfs?

Is there a previous view feature in Mendeley for viewing pdfs (similar to the one from Adobe Reader using alt + left arrow) to jump between the source and the destination of a link (for example to the ...
silence_of_the_lambdas's user avatar
8 votes
0 answers
2k views

extract raster and vector images from pdf with a bash script

I needed a bash script which extracts all the raster and vector images from the pdf and convert them to jpg format. I checked many posts on the web and I got most of the ideas from these How can I ...
Zoltán Süle's user avatar
8 votes
0 answers
1k views

Save a WPF control to PDF using printvisual

Saving a WPF page to a pdf is simple PrintDialog printDialog = new PrintDialog(); printDialog.PrintQueue = new PrintQueue(new PrintServer(), "Microsoft Print to PDF"); printDialog.PrintVisual(grid, "...
Sombex's user avatar
  • 81
8 votes
0 answers
1k views

Acrobat PDF generated with FlyingSaucer & ITextRenderer seems to be removing links

I have HTML that contains links such as the following: <p class="Results">Web : SPLIT<a href="http://www.google.fr/">http://www</a> SPLIT<a href="http://www.google.fr/">....
Menelaos's user avatar
  • 26.5k
8 votes
0 answers
2k views

Apps Script save as pdf doesn't include drawings and images

I want to save a Google Doc file as a pdf in the same Google Drive folder as my current file. I know I can download the file as a pdf, but then I have to upload it into the same Google Drive folder. I ...
davids's user avatar
  • 5,587
8 votes
0 answers
2k views

converting pdf to png or jpg with imagemagick: png has antialiasing, jpg does not?

I'm trying to get imagemagick to convert a .pdf to .jpg at high resolution with antialiasing. convert -density 300 test.pdf test.jpg gives: (zoomed 200% to show the effect) However convert -density ...
RocketNuts's user avatar
  • 11.2k
8 votes
0 answers
3k views

Ghostscript not creating output PDF file

I'm having trouble writing an output PDF file with Ghostscript. It is run in a batch script. When not running in batch mode (without -o or -dBATCH), the result pages are shown in the output window. ...
3840's user avatar
  • 376
8 votes
1 answer
551 views

Protecting PDF's

I am currently using the Apache FOP library to generate PDF's. I want these PDF's protected from copy-pasting, so people would have to use actual OCR libraries (or manual typing) to get the ...
Kristof's user avatar
  • 1,734
8 votes
2 answers
12k views

Can't seem to turn off a device using dev.off() in R

I'm using Jupyter notebooks running an R kernel (3.2.2) in OSX, working through some basic stats exercises. A few days ago I played with ggplot for the first time, and ran some commands from a ...
jtd's user avatar
  • 101
8 votes
0 answers
16k views

How to Print PDF file directly from node application?

I am creating a pdf-document from HTML in my nodejs application with phantomjs. This works totally well so far. Now I want to directly print this file to a network printer. I am using the node-printer ...
Ello's user avatar
  • 917
8 votes
0 answers
2k views

Command-line to execute Acrobat Action Wizard action from VBA

I've built an action in Action Wizard in Adobe Acrobat Pro 11 and named it say "myAcrobatAction". I want to use it automatically in Outlook using VBA code. Is there a way to call the user defined ...
Max Segal's user avatar
  • 2,055
8 votes
0 answers
5k views

get X,Y co-ordinates of the selected area from PDF

I'm trying to extract text from a particular section of a PDF. If I know the X,Y co-ordinates of the area, I'm able to extract the text. But I'm unable to get the co-ordinates of the selected area ...
Sasikumar's user avatar
  • 685
8 votes
1 answer
5k views

android how to convert pdf to image and load in imageview

I'm developing an android application get the PDFs from j son and convert the PDFs files into image and display converted images on a image view. (not a web view or PDFs viewer) i need to convert the ...
Dinithe Pieris's user avatar
8 votes
1 answer
2k views

Embedding video/flash in PDF using php

Is it possible to dynamically embed video(any format)/ flash into PDF using php? I found this Link, but not useful. Also I googled but didn't find a satisfying answer to my question that Whether it ...
Uttara's user avatar
  • 2,532
8 votes
1 answer
1k views

Converting Layered .ai to PDF via PHP

I've a .ai file with 2 Layer Groups and I want to pipe them into a .pdf file with layers. I already tried ImageMagick but I can't get the selector. I tried this: exec("convert 'test.ai[0]' output0....
Kevin Kleinjung's user avatar

1
2 3 4 5
422