FAQ Database Discussion Community


PDF to Text extractor in nodejs without OS dependencies

node.js,pdf,pdftotext
Is there a way to extract text from PDFs in nodejs without any OS dependencies (like pdf2text, or xpdf on windows)? I wasn't able to find any 'native' pdf packages in nodejs. They always are a wrapper/util on top of an existing OS command. Thanks

Large JDF / PDF Print Job Rejected on Canon Vario 6000

pdf,printing
Using JDF Template to fill in data about my print job, which is then prepended to the pdf I am printing. The print job transfers (via lpr) and prints successfully when there are not a lot of pages, but when I create a large job (1500 pages) it fails with...

What does the value `/W` mean in PDF `/Tabs` key?

pdf,format,structure
According to the PDF 1.7 specifications, a PDF may only have the values /R, /C and /S on the /Tabs key of a page object (see PDF reference Page 145, Table 3.27). I have a PDF in front of me that fails in PDF structure preflight with a value /W...

How to fetch TAMIL values in FPDF?

php,pdf,fpdf,tamil
I used mysql_query ("set character_set_results='utf8'"); to fetch the unicode(tamil) values stored in my database. But the output is just like Status: ????? Is there any possible fpdf functions to fetch tamil values??...

Embed PDF in a website, allow user to modify editable fields in PDF, and save back to the server

ruby-on-rails,ruby,pdf,ruby-on-rails-4
I am writing a Program in Rub On Rails 4.x and I have to take PDF files with defined fields that can be filled out, fill in data from a form submission(This part is DONE!), and lastly allow the user to modify the saved PDF file on the server and...

File upload pdf issue

ruby-on-rails,ruby,image,pdf,file-upload
I'm using carrierwave, minimagick and Rails 4. I have a FileUploader that looks like: class FileUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick version :thumb, if: :image? do process :resize_to_limit => [50, 50] end version :thumb, unless: :image? do process :cover process :resize_to_fill => [50, 50, Magick::NorthGravity] process :convert => 'png' end protected...

create pdf from current page ASP.NET

c#,asp.net,pdf,render
I want to create a PDF from my current page on button click. Now my Code looks like that: protected void btnSave_Click(object sender, EventArgs e) { renderPDF = true; } protected override void Render(HtmlTextWriter writer) { if (renderPDF == true) { dtAnswer = taAnswer.GetData(); MemoryStream mem = new MemoryStream(); StreamWriter...

the pdf file is created but cannot be opened

php,pdf,birt
From my PHP page I want to create/launch a BIRT report : ... new runReport("rptPrixParDaty.rptdesign", array(), "prixpardaty"); The report is based on a view. Code of runReport which is inside /birt/ : <?php include("../config.inc.php"); require_once("java/Java.inc"); class runReport { function runReport($report, $param, $output) { header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=".$output.".pdf"); $report_name =...

Itext get special letters from pdf

java,pdf,itext
I am trying to extract accented words from pdf e book . The best results are produced when using itext library , but I fail to get accents from words . example : побеђивање -should come out as- побеђи́ва̄ње (accents are missing) The letters are Cyrillic Serbian . I tried...

passing one variable from one page to another for pdf generation

php,pdf,phpexcel,tcpdf
I have a page that I have used to retrieve some excel data written in php... by using phpexcel... this part provides me company information echo '<form action="final.php" method="post">'; echo "<table border='1'>"; for ($rowcount = $rowCompanyInfoStart; $rowcount <= $rowCompanyInfoEnd; $rowcount++) { //$data = $objWorksheet->rangeToArray('A1:' . $maxCell['column'] . $maxCell['row']); $rangeCoordinates =...

PDF file empty after outputting with Jersey

java,pdf,jersey
I am trying to send a PDF file I generated in my server to my client in my Jersey application. The generation goes just fine, I created the file on my local machine and there is no problem with it. Problem arises when I try to send it by a...

Acrobat Reader would like to re-design my PDF file

pdf,pdf-generation
I am making my own PDF parser/maker. For the moment I am able to parse existing PDF file and even make a new PDF based on the early parsed data. But the problem is that when I open a new PDF file (made by my parser/maker) Adobe Reader would like...

Will iTextSharp version 5.5.2 run with C#, .net version 3.5 code?

c#,pdf,itextsharp
I need to merge mutiple pdf files into one pdf. My code is using .net and C# version 3.5. From what I have read here in StackOverflow and elsewhere, iTextSharp seems to be most highly recommended pdf file manipulation utility. Will the latest version of iTextSharp on sourceforge.net, I think...

Ghostscript for PDF: how to fit 4 pages into 1?

pdf,ghostscript
I need to use ghostscript for concatenating several PDFs into a single pdf file. The help I need from you is what command do I have to use, in order to edit the output page, so that it fits 4 pages of the input files, into 1 of the output....

Converting a docx containing a chart to PDF

java,pdf,charts,docx,docx4j
I've got a docx4j generated file which contains several tables, titles and, finally, an excel-generated curve chart. I have tried many approaches in order to convert this file to PDF, but did not get to any successful result. Docx4j with xsl-fo did not work, most of the things included in...

Enforce PDF package vignette with knitr

r,pdf,knitr,vignette
I have a vignette for my package which compiles to a nice PDF when compiled with Rscript -e 'rmarkdown::render("tmod.rmd")'. However, when I compile and install the package, start R and type vignette("mypackagename"), a browser window opens with ugly looking HTML, without a title, without a table of contents and without...

Cannot open PDF file in external app

android,pdf,uri,assets
I would like to open a PDF file when the user clicks on a button. Currently, i am using this code to achieve this: Uri path = Uri.fromFile(new File("file:///android_asset/regola11_1.pdf")); Intent pdfIntent = new Intent(Intent.ACTION_VIEW); pdfIntent.setDataAndType(path, "application/pdf"); pdfIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(pdfIntent); but it doesn't work. When i select to use Adobe Acrobat, i...

giving error while creating pdf.The process cannot access the file.because it is being used by another process

c#,asp.net,pdf,itextsharp
im exporting web page div into pdf and sending that mail to pdf. for first time its creating pdf and sending mail properly.but for next time its giving error saying . file is bieng used by a another process at this line PdfWriter writer = PdfWriter.GetInstance(pdfDoc, new FileStream(strPath, FileMode.Create)); my...

Embedding Pdf with OpenXml in PowerPoint fails for newer versions

c#,pdf,powerpoint,openxml,ole
I need to progammatically embed Pdf documents in PowerPoint via OpenXml. According to this: Embedding files into Open XML documents using C# it is possible via OLE32.StgCreateStorageEx methods to create the necessary picture as well as the oleobject. Unfortunately this doesn't work with current versions of PDF. On a 64...

error while creating PDF

android,pdf,android-studio,itext
I am trying to generate a PDF using Android Studio. I am using the iText library, but when I add it into Android studio, I get the following error: Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2 When I remove the...

iOS create pdf from UIWebview content

ios,pdf,uiwebview
In my app for iOS i need to create a pdf document from my webview content. I watched these posts: Creating PDF file from UIWebView and https://coderchrismills.wordpress.com/2011/06/25/making-a-pdf-from-a-uiwebview/ I wonder if there is a simpler way to do it. For example for my project for Mac i use this: NSData *pdf...

How make iOS UIActivityViewController show “Open in Google Earth” for local KML file?

ios,pdf,kml
Using iOS Mail app: I can select a KML email attachment in the iOS mail app. When the AirDrop page appears, Open in Google Earth is one of the choices. How can I make my app work the same as iOS mail app? When I use UIActivityViewController and create a...

Merging PDF files with similar names using PDFTK and a bash script

linux,bash,pdf,merge,pdftk
I have a directory with a few hundred pdfs in it. All of the PDFs filenames begin with a 5 digit number (and then have a bunch of other stuff at the end). What I need to do is merge any PDFs together that start with the same 5 digit...

JQuery/Javascript or other way Silent Print once only

javascript,jquery,html,pdf,printing
Anyone knows how to print a file without showing print preview in cross browsers, API or libraries like jQuery or javascript or else. Print a content without print preview (just silent print) Print once, when softcopy is printed then the softcopy is expired because I want to avoid reprint the...

Crop Pdf from each edge using itextshap

c#,pdf,itextsharp
I am trying to crop pdf 5 mm from every edge i.e top,bottom,right and left. I tried with below code public void TrimPdf(string sourceFilePath, string outputFilePath) { PdfReader pdfReader = new PdfReader(sourceFilePath); float widthTo_Trim = iTextSharp.text.Utilities.MillimetersToPoints(5); using (FileStream output = new FileStream(outputFilePath, FileMode.Create, FileAccess.Write)) using (PdfStamper pdfStamper = new PdfStamper(pdfReader,...

How to reorder the pages of a PDF file?

java,pdf,itext
I am generating Table of Contents at last,I want to move Table of Contents at Beginning. Suppose that I have 16 pages in my PDF and that the TOC starts from page 13 and ends on page 15. I want to move the TOC to the second page, so that...

Generate TCPDF output to a shared drive folder

php,pdf,path,directory,tcpdf
I'm trying to save my PDF file to a "Shared Folder", I'm using a configuration file to set the "Shared Folder" and then I just set the path inside the PHP file. However it doesn't allow me to save with a "Shared Folder" path, it gives me the error: Failed...

Display PDF from path saved in mysql

php,mysql,pdf
I have the path to a pdf file saved in a mysql database. What I want to do is query the database for that path and then display the pdf. I've tried a few different things but it keeps asking to download the file instead of displaying it. I'm getting...

To search a particular file in PDF document using Java

java,pdf
Hi I have a PDF file and I need to search a particular string in that. I tried various methods, and I am able to read all the contents in PDF file but unable to find a particular string. Here in this file, I need to search string such as...

iOS - Differentiate between background text (watermark) and real text in PDF

ios,pdf,cgpdfscanner
I have a pdf with watermark at the background of it. When start scanning for highlighting any word with watermark or annotation at background, that gets selected as it is found first in touch area. I am using CGPDFScanner to scan the text. My question is how detect if scanned...

Extract PDF Form Data Using JavaScript and write to CSV File

javascript,forms,csv,pdf,acrobat
I have been given a PDF file with a form. The form is not formatted as a table. My requirement is to extract the form field values, and write them to a CSV file which can be imported into Excel. I have tried using the automated "Merge data files to...

Prevent PDFsharp from saving an image file?

c#,pdf,pdf-generation,pdfsharp
I have prevented my program from saving images downloaded as files. (They are saved in Image variables instead). However, my application is slowed down significantly because the PDFsharp libraries save the image files anyway before drawing them to the PDF document. This is done deep within a hierarchy of calls...

Generate or Update Barcode on editing PDF textbox in Adobe reader XI

pdf,adobe,acrobat
I have created one acrobat form using of the Radiobutton, Text Field, Button,CheckBox and Barcode in Adobe Acrobat Pro. After that I had opened that form in the Adobe Reader Version 8 and the Barcode is updated on edit of PDF page made from Adobe Acrobat Pro. to Adobe reader...

Viewing PDF with Java [duplicate]

java,pdf,itext
This question already has an answer here: Java PDF Viewer 2 answers I am working on a program that should create, Show and Extract text from PDF files but i cant find a free library that will show PDF files or at least convert them to images to work...

Downloading a PDF file and saving it to temporary directory iOS

ios,objective-c,pdf,nsurlconnection,nsfilemanager
My app displays PDF files from a list. I am struggling to understand the File Management in iOS. I read the guide here but it isn't helpful: https://developer.apple.com/library/mac//documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010672 I don't get how to access the /tmp folder to write to it. I guess I'll need to use NSURLConnection with URLsForDirectory:inDomains:...

Image in PDF Report using wkhtmltopdf on rails

ruby-on-rails,pdf
I want a PDF report with image in record. the html report works fine with below code: <% if @student.photo.file? %> <%= image_tag @student.photo.url %> <% end %> but when I try pdf report with following code it doesnt work. pls help. <% if @student.photo.file? %> <%= wicked_pdf_image_tag @student.photo.url %>...

Multiple signatures with Itext - issue with existing signature blocks

java,pdf,itext
So im currently working on a project to sign PDF documents and I ran into a problem. So i can sign documents correctly without any problems if I specify the block to sign i.e. signatureAppearance.setVisibleSignature(rectangle, page, signingBlockName); I can add multiple signatures without a problem and all of the signatures...

Why is this pdf file broken and how to fix it?

pdf
I'm considering the following page of a book. If it's being viewed in a web preview, it is displayed properly. If I download a pdf of this page, it seems to be blank. It only seems. The text can be selected and copied (in the Firefox preview and Evince (but...

Add Header and Footer Image in PDF using docraptor c#

c#,pdf,header,footer
I am using docraptor (https://docraptor.com/samples) for creating the PDF but I am not able to add Image as Header and Footer into generated PDF. I have below Html and I am using AJAX to call the API and passing below HTML as content to crate a pad but its not...

Prevent Caching of PDFs in ASP Classic

pdf,caching,asp-classic
I just started to manage a website for the company I work for and it is still running with ASP Classic so I have had to learn quite a bit. Recently our managment has started to post a dynamically updated PDF to the website every few hours. The problem I...

Generating pdf file through ajax call

javascript,php,jquery,ajax,pdf
I've got a button (link to controler/action) which after clicking calls action validating and generating pdf from php. This function validates i.e. if pdf should generate for this user and if there will be any errors it would not generate certificate but show those errors (of course, if there's no...

Variable substitution within HEREDOC literal

php,html,pdf,tcpdf
i would to create a pdf file with TCPDF library files. and i would to use a specified and dynamic file name in the html code that then will render to pdf file. i use the following code to do this but doesn't work: $html = <<<EOD <div> </br> <img...

Arabic words in invoice pdf print Magento

magento,pdf,tcpdf,arabic
I'm trying to fix this problem by using integration TCPDF in magento but i don't know how do that this is my try in this file \app\code\core\Mage\Sales\Model\Order\Pdf\Abstract.php require_once('TCPDF/TCPDF.php'); $pdf = new TCPDF_TCPDF (PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true,'UTF-8', false); I don't know waht i'm doing wrong. thank you....

Carrierwave file upload with different file types

ruby-on-rails,ruby,image,pdf,carrierwave
I have the following as my FileUploader: class FileUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick version :thumb, if: :image? do # For images, do stuff here end version :preview, if: :pdf? do # For pdf, do stuff here end protected def image?(new_file) new_file.content_type.start_with? 'image' end def pdf?(new_file) new_file.content_type.start_with? 'application' end end I...

Add image and text in one line itextsharp

vb.net,pdf,itextsharp
Below code is adding text and image in separate lines. How can I display them in one line? pdfDoc.Add(image) pdfDoc.Add(New Paragraph(text)) ...

pdf printer that can be controlled by .Net

c#,pdf,printing
In my current project, I created an automatic process that control a software ( Maptitude), make work on it, then print the outcome to PDFs using the given API. The problem I get stuck on is that, Maptitude neither have an option to save the outcome to PDF nor return...

How to draw dotted line in pdfBox

java,pdf,pdfbox
I'm using Pdfbox to draw some line on my document. Code: contentStream.drawLine(startX, startY, startX, endY); The result is an straight line. I wonder Does the PdfBox can draw dotted line?...

Using scraperwiki for pdf-file on disk

python-2.7,pdf,scraperwiki
I am trying to get some data out of a pdf document using scraperwiki for pyhon. It works beautifully if I download the file using urllib2 like so: pdfdata = urllib2.urlopen(url).read() xmldata = scraperwiki.pdftoxml(pdfdata) root = lxml.html.fromstring(xmldata) pages = list(root) But here comes the tricky part. As I would like...

Hierarchical Bookmark Generation in PDF using PDFBox library [closed]

java,pdf,pdf-generation,pdfbox
How can I create a hierarchical bookmark for a PDF like this: Root ---Node-1 -------Node-11 -------Node-12 .... ---Node-2 -------Node-21 .... I have a bidimensional array (I accept any kind of list/set for the example) with node names like this: 1 11, 12, ... 2 21, 22, 23, ... ... This...

Efficient way of exporting a bunch of PDF's from a user?

php,pdf,cron,wkhtmltopdf
I need to give our users the ability to export a bunch of their PDF's (invoices).The problem is, the PDF's are generated everytime a user opens them. So I don't have them already stored in a filesystem. So, my question is, what would be an efficient way of exporting a...

Mark a file as created by my app

c#,.net,file,pdf
My application creates some pdf files using some private assemblies and then send them to another app by copying them in the second app folders. After a while I need to come back and get my files and update them, the thing is that meanwhile some other pdf files can...

How to handle the File hand-off from windows in a python program

python,windows,pdf,file-io
I want to set up my python program to process all pdfs that are opened on my system, and then hand the processed pdf off to a standard reader. So I register my program with windows as the default handler for .pdf files and windows presumably will run my program...

Javascript: How to create pdf file from HTML form or div

javascript,jquery,pdf,pdf-generation,tcpdf
I am new to Javascript / jQuery and am looking for a way to add a button to a page that allows the user to create a pdf from a pre-defined form or div (e.g. by adding a class). I did some research but could not find a way to...

What is the best way to generate PDF/HTML/DOCX in Ruby/Rails

ruby-on-rails,ruby,pdf,prawn
I need to create an app which makes auto-generated CVs from fields. I need to convert them in PDF/HTML/DOC, but there are many gems available. Which gem do you think is the most appropriate in order to make CV in PDF, HTML and DOC formats? I found prawn for PDF,...

Compressing a PDF document generated by coldfusion

pdf,coldfusion,coldfusion-8,pdf-conversion
I'm trying to overhaul a pdf report generation application built in CF8 and they have an interface which generates a 50 page legal report as a pdf and sends it out about 100x a day. However, its very cumbersome and bogs down an already overworked server. Is there a good...

PDF as mail attachment - Laravel

laravel,pdf,sendmail
I want to create a PDF using the barryvdh/laravel-dompdf package and send this with an email as attachment. The code I have now is: $pdf = PDF::loadView('layouts.factuur', array('factuur' => $factuur)); Mail::queue('emails.factuur', array('factuur' => $factuur), function($message) use ($pdf) { $message->to(Input::get('email'), Input::get('naam'))->subject('Onderwerp'); $message->attach($pdf->output()); }); But now I get the following error: Serialization...

Multiple Plots with ggplot2: Non-closing files and blank pages

r,pdf,plot,ggplot2
I have a strange phenomenon when storing multiple ggplot2 plots as pdf. When storing with ggsave, I am getting B_ggplot.pdf OK, but A_ggplot.pdf does not close the file (it seems locked). The old method sometimes generates a blank page. There seem to be race conditions, but I cannot put my...

prepareForSegue send Pdfs error - could not cast

ios,uitableview,swift,pdf
I want to ask how to send correctly pdfs between a tableView and a webView. For this I have 2 strings with names of the rows in tableView and another one with the names of pdfs that I wanna to transfer I've been following the respective steps from a tutorial...

Can't get deployd pdf modul to work dpd-pdf

node.js,pdf,deployd
i have install'ed deployd pdf modul dpd-pdf https://github.com/diadistis/dpd-pdf In dashboard i creted a /pdf with conf path to C:\export\wkhtmltopdf\bin\wkhtmltopdf.exe "wkhtmltopdf path" but when i post to http://localhost:2404/pdf i just get this return, and no pdf files anywhere { "message": "resource not found", "status": 404 } ...

Rails 3 email a wicked pdf issue

ruby-on-rails,pdf,wicked-pdf
I have gem 'wicked_pdf' and gem 'combine_pdf' in a Rails 3.2 app. It works great if I'm displaying the pdf in browser. I would like to email the pdf. My current code sends the email, but the pdf is just garbage: This is the controller code: def pdfemail @costprojects =...

printing spreadsheet to pdf then saving file in drive using oauth2

pdf,google-apps-script
function topdf() { var foldersave=DriveApp.getFolderById('0Byy1DdsfdfTQRnVlfb05wOV83T00') var d= new Date() var oauthConfig = UrlFetchApp.addOAuthService("google"); var scope = "https://docs.google.com/feeds/"; //make OAuth connection oauthConfig.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken"); oauthConfig.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope="+scope); oauthConfig.setAuthorizationUrl("https://www.google.com/accounts/OAuthAuthorizeToken");...

iText, FileNotFoundException when adding image to pdf

android,image,pdf,itext
I am trying to add an image to my pdf using iText and when following the iTexts documentation on this its just simply telling me to do this: Image img = Image.getInstance("res/drawable/toplogos.png"); document.add(img); But I am getting FileNotFoundException. Why is that? The file is in the drawable folder. Thanks....

Objective C - bold and change string text size for drawing text onto pdf

objective-c,xcode,pdf,size,bold
I've created a .xib file with a uiview solely for the pdf document that I have created. I've primarily followed this tutorial for code: http://www.raywenderlich.com/6818/how-to-create-a-pdf-with-quartz-2d-in-ios-5-tutorial-part-2 From the above, I can't edit labels (plain or attributed) from the interface builder as even after changing size, it doesn't apply when the app...

Some sites do not allow requesting the same file twice (IDM)

c#,asp.net,pdf,web,httpresponse
Some sites do not allow requesting the same file twice : I face the previous error when i try to download my pdf in button click event: private void AddReportToResponse(LocalReport report ) { string mimeType; string encoding; string extension; string[] streams = new string[100]; Warning[] warnings = new Warning[100]; Response.Clear();...

Problems with uploading some of PDF files in Laravel 5

pdf,file-upload,laravel-5,mime-types
I have an application based on Laravel 5 with file upload functionality. Everything works fine except uploading of some PDF files. The applications can not upload some of PDF files, and when I try to open them, they seems normal like any other PDF files. Any idea how to solve...

PDF file path is incorrect [duplicate]

java,android,pdf,android-studio,filepath
This question already has an answer here: Android - Access file from assets \ PDF display 4 answers I want to open a PDF file in my application but something goes wrong everytime. Yeah , I watched many topics about it, however none of them helped me. Here are...

Adobe LiveCycle Flowed Form page margins

pdf,adobe,livecycle
I am using Adobe LiveCycle Designer ES 8.2 to create a PDF for a survey. I've managed to create the form from scratch using Flowed content boxes to allow the fields to dynamically expand so that I can print out the survey later. The issue I am having right now...

Geneate table in pdf using itextsharp vb.net from sql

sql,vb.net,pdf,itextsharp
I can create a simple pdf file like "Hello world", but I want to generate a table in pdf file using vb.net. I am using itextsharp library. This is what I have tried so far. Protected Sub Create_PdfTable_Click(sender As Object, e As EventArgs) Handles Create_PdfTable.Click Dim table As New PdfPTable(2)...

Why PDF exported from Report Viewer opens in different zoom size in Adobe Reader

c#,pdf,reporting-services,reportviewer
I have 16 Reports in my current application. when I export the reports through Export drop down menu to PDF file, it saves to my local disk. But when I open the PDF through Adobe Acrobat Reader it opens it with a different zoom size for each report. Why I...

how i read file PDF in SD card in androide? [duplicate]

android,pdf,sd-card
This question already has an answer here: How to read pdf in my android application? [closed] 4 answers I have a .PDF file saved on my sdcard. I need to read the content of .PDF file and show it in a TextView. Can anyone please tell me how to...

How to Check PDF is Reader enabled or not using C#?

c#,pdf,itextsharp,pdfbox
My only requirement is to find a selected pdf in a folder is Reader enabled or not, more specifically if usage rights are defined in a way that allows people to add annotations (e.g. comments). I am doing this in windows application. If I click a button, an event is...

Batch file that will print all files (.pdf's and .docs) in a directory

windows,batch-file,pdf,printing,dos
Running Win7, I need a batch file that will print all .doc and .pdf files in a particular directory. Any help greatly appreciated!

How to print multiple instances of QTextBrowser into one PDF file?

c++,qt,pdf,qtextbrowser
the QT application I'm working on comes with a tutorial. Each chapter is a stand-alone HTML file, each file can span multiple pages. Now I want to print them into one single PDF file (with page numbers). My naive approach was this, but it's wrong: #include <QApplication> #include <QPrinter> #include...

Symfony - Save pdf file to upload directory with PsPdfBundle

symfony2,pdf
I used the basic code from bundle to generate pdf and the browser-output works. (Controller) public function fileAction($name, Request $request) { $format = $this->get('request')->get('_format'); $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('TestBundle:Kunden')->find($name); return $this->render(sprintf('TestBundle:Kunden:file.%s.twig', $format), array( 'name' => $name, 'entity' => $entity, )); I want to save the file in upload folder,...

Qoppa PDF Android NullPointer

android,pdf,nullpointerexception,pdf-viewer
I`m trying qoppapdf in my App and it runs into an NullPointer in the following code: PDFDocument pdf = null; try { pdf = new PDFDocument(url, null); } catch (PDFException e) { e.printStackTrace(); } PDFPage page = pdf.getPage(0); The error reads: 06-01 17:29:59.687 24761-24761/app W/dalvikvm﹕ Exception Ljava/lang/NullPointerException; thrown while initializing...

Adding an imported PDF to a table cell in iTextSharp

pdf,itextsharp
I am creating a new PDF that will contain a compilation of other documents. These other documents can be word/excel/images/PDF's. I am hoping to add all of this content to cells in a table, which is added to the document - this gives me the goodness of automatically adding pages,...

link coming twice while exporting to pdf using itextsharp

pdf,gridview,itext
my asp boundfield: <asp:BoundField DataField = "SiteUrl" HtmlEncode="false" HeaderText = "Team Site URL" SortExpression = "SiteUrl" ></asp:BoundField> My itextsharpcode for (int i = 0; i < dtUIExport.Rows.Count; i++) { for (int j = 0; j < dtUIExport.Columns.Count; j++) { if (j == 1) { continue; } string cellText = Server.HtmlDecode(dtUIExport.Rows[i][j].ToString());...

Why does R re-size everything in the plot but not the text when exported?

r,pdf,plot
Whenever I try to export R plot, either with RStudio with with pdf(), I find that all the elements are re-sized accordingly but not the text. This can lead to titles being cut off even. Try resize this plot in Rstudio (or use pdf("plot.pdf", width, height) in base R): ggplot(data=data.frame(x=rnorm(100),...

PDF Parsing — Extract single page

pdf,pdf-generation
I recently wrote a program in Python that allowed me to read in a PDF, take some commands from the user, and output part or all of the original PDF with pages in different orders. You could also select which pages you were interested in. At the time, there was...

pass HTML to phantom and render it to PDF

node.js,pdf,phantomjs
Normally in phantom you would be able to do something like this: phantom = require('phantom') phantom.create(function(ph){ ph.createPage(function(page) { page.open("http://www.google.com", function(status) { page.render('google.pdf', function(){ console.log('Page Rendered'); ph.exit(); }); }); }); }); However instead of loading a webpage i already have some html i want to pass and render as a PDF....

PdfBox issue while changing page

java,pdf,pdf-generation,rendering,pdfbox
I'm not a big fan of asking this kind of questions but well, it's been 3 whole days now trying to solve this bug on my code. I know it's a logic problem and I know how to solve it in my mind, but when it comes to translate my...

Save locally generated PDF to app's documents folder in iOS8

pdf,ios8,uiwebview,nsdocumentdirectory,writetofile
It would seem that my apps no longer are able to save files to their documents folder when doing this: NSString *path = [documentsDirectory stringByAppendingPathComponent:fileName]; NSData *dta = [[NSData alloc] init]; dta = [NSData dataWithContentsOfFile:path]; NSLog(@"writing file: %@", path); if ([dta writeToFile:path options:NSAtomicWrite error:nil] == NO) { NSLog(@"writeToFile error"); }else...

Convert HTML Div to PDF via Jquery

html,pdf
Im trying to convert my div to PDF. this is my HTML code: I can download it just fine but I want to show in the PDF file the Div float:left is aligned with Div Float:right. <script lang="javascript" type="text/javascript"> function run() { var pdf = new jsPDF('p', 'pt', 'letter'), source...

Is it possible to save an adobe pdf file using selenium web driver and one click build Jenkins

java,pdf,selenium,jenkins
Here's my dilemma. I'm creating some automation tests using selenium web driver coding in Java. The main output of the software is to load a PDF in adobe acrobat. I'm also using Jenkins which is why my problem has come about as I wont be able to physically see the...

Errors downloading Powerpoint and PDF files after nginx update

pdf,nginx,download,gzip,powerpoint
I am hosting my site on an nginx server at DigitalOcean & ran some updates. Before the updates, I was able to upload PDF and Powerpoint files to the server and download them without problems. Now, whenever I try to download a file I recieve an error "Powerpoint found a...

Error in PDF Export

java,pdf,itext
Here is my code snippet- getResponse().setContentType(NAPSConstants.PDF_CONTENT_TYPE); getResponse().setHeader(NAPSConstants.PDF_CONTENT_DISP, NAPSConstants.PDF_ATTACHMENT_FILE+getText("rcmid.details")+NAPSConstants.PDF_EXTN); //Set the Page Size Document document = new Document(PageSize.A3, 40, 40, 40, 40); PdfPTable table = new PdfPTable(rcmDetailsCols.length); for(RCMIDPartsDetailsDTO part : rcmidDTO.getPartsDetailsDTO()){ table.addCell(part.getPartStatus().equals(NAPSConstants.Active) ? PDFHelper.dataCell(...

FPDF + associative array key value column

php,arrays,table,pdf,fpdf
I'm trying to create a PDF with the FPDF library. I have an array like this: array (size=27) 'JobTitle' => string 'test-job' (length=8) 'lastName' => string 'zaezaeza' (length=8) 'firstName' => string 'zaezaeaz' (length=8) 'street' => string 'azezaeza' (length=8) 'streetNr' => string '54' (length=2) 'place' => string 'zaezaeza' (length=8) 'postalCode' =>...

set background image to a specified page with @page selector

php,html,pdf,selector,mpdf
i would to create a pdf file from html with mpdf library. i would to set a background image just to 2'nd page of rendered pdf(not all pages). i use the following code: $mpdf=new mPDF(''); $html = ' <body> <style> @page { background: url("../mpdf60/bg1.jpg") 50% 0 no-repeat; } </style> <div...

Watermark in PDF file is hiding behind images

c#,pdf,itextsharp
I want to add a watermark to an existing PDF by using the following: ITextSharp insert text to an existing pdf The 3rd answer is working but if the PDF contains an image then the watermark is hidden behind it....

How to display PDF in JSF, with content from ServletResponse

jsf,pdf,jsf-2,richfaces
In my application, I use jsf & richfaces, I want to display a generated pdf in web browser , I have generated this PDF in serverside and it is available in ServletResponse, but I am unable to display it in my web page. I have tried this question but, it...

How to extract text by a selected area from a PDF file using iText?

java,swing,pdf,awt,itext
I am working on a program that extract texts from a PDF file in a specific area, I am using java and iText library. Right now, i can extract data by taping the area coordinations using this code: import java.io.IOException; import com.itextpdf.text.Rectangle; import com.itextpdf.text.pdf.PdfReader; import com.itextpdf.text.pdf.parser.FilteredTextRenderListener; import com.itextpdf.text.pdf.parser.LocationTextExtractionStrategy; import com.itextpdf.text.pdf.parser.PdfTextExtractor;...

serve a stringIO (pdf) as download python

python,pdf,download,cgi
I have a cgi python script which saves a matplotlib generated picture as pdf to stringIO and as png to stringIO. The png picture will be shown on a new page which works well. sio = cStringIO.StringIO() pylab.savefig(sio, format='pdf') sio.close() sio =cStringIO.StringIO() print "Content-type:text/html\r\n\r\n" pylab.savefig(sio, format='png', bbox_inches='tight') print "<html>" ......

PDF Filter used to encode data in iTextSharp

pdf,pdf-generation,itextsharp
Currently I am working with iTextSharp library to generate PDF files and these files will be processed by some file processor. This pdf file processor is having some limitation with pdf filters which it will use to decode the data from the file. I am very keen to know which...

Splitting at a specific point in PDFBox

pdf,split,pdfbox
I would like to split to generate a new pdf by concatenating certain individual pages, but the last page has to be split at a certain point (i.e. all content above a limit to be included and everything below to be excluded - I only care about the ones having...

AX2009 “DateFormat” of utcDateTime changes when printed to PDF from AX report

pdf,axapta,x++,dynamics-ax-2009
I have been tasked with changing the format in which the date is shown in a reporting using the a utcDateTime field. Example To change date from "5/4/2015" to "4-May-15". I have changed the field control properties in the report setting DateFormat:DMY, DateSeparator: --, DateYear: TwoDigits, DateMonth:Short name (first three...

How to render PDF byte array in an HTML Object tag

c#,asp.net,pdf,aspose
I have a PDF that was generated by ASPose as a byte array, and I want to render that PDF inside of a component on a web page. using (MemoryStream docStream = new MemoryStream()) { doc.Save(docStream, Aspose.Words.SaveFormat.Pdf); documentStream = docStream.ToArray(); } I thought it would just be a simple variation...

Downloaded octet-stream then encoding as pdf; can't get line endings worked out

pdf,encoding,httpresponse,fiddler
Tools that I'm using for this: Chrome Notepad++ Sublime Text 3 Fiddler WinMerge Adobe Acrobat Reader X Synopsis I have downloaded a pdf twice, once through Chrome as an experimental control; once again through a raw /GET request via Fiddler which returns me an octet-stream. To this point, I can...

jsreport render to writableStream

node.js,pdf,express,jsreport
I'm trying to let jsreport write to a writablestream, if I print the buffer in the writablestream I get a pdf desciption, but if I save to a pdf file I get a error that the pdf file is corrupted. function streamtoPdf(template, callback) { var ws = new stream; ws.writable...

li padding issue in mpdf

html,css,pdf,mpdf
I have the following piece of code: <ol> <li>Text</li> <li>Text</li> <li>Text</li> </ol> And my CSS is the following: li { padding-top: 200px !important; padding-bottom: 200px !important; } padding is not working in PDF creation...

Combine base and ggplot graphics in R figure window in different pages

r,pdf,plot,ggplot2
I used this solution to combine an R plot and ggplot and then used it in a loop to print a of these to a pdf in different pages. But for some reason the margins get bigger in every new page and at some point plots disappear. How can I...