Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-1 votes
3 answers
60 views

How to generate a PDF with a grid of images per page?

Our work involves visually inspecting a number of plots together. All plots of same size. we want to print them in pages to study. Something like a 8.5"x11" paper with 1" margin gives ...
BiGYaN's user avatar
  • 7,177
2 votes
1 answer
119 views

Losing image resolution when converting PDF to image and back with PDFBox

I had a Java program written for me that would take a single page 36" high x 48" wide PDF file and would "slice" it into 3 single pages, 12x36, 24x36 and 12x36 of which I would ...
David Owens's user avatar
0 votes
0 answers
24 views

Error with pdf-to-img library in TypeScript (NestJS): "esModule() is not a function"

I'm working on a NestJS project using TypeScript and trying to convert a PDF (from either a stream or a buffer) into images. I decided to use the pdf-to-img library. However, when I try to use the ...
dmx's user avatar
  • 83
0 votes
0 answers
63 views

How to Center and Scale Images Proportionally in a PDF Using jspdf Without Quality Loss?

I want to display images within a PDF using jspdf, but I am facing an issue with how the images are being rendered. Issue: The image is covering the entire div in the PDF. Desired Result: The image ...
Negin's user avatar
  • 331
1 vote
0 answers
36 views

FOP internal image processing - inverting colors

I am generating a pdf via xsl/fo. In that base xml I am using <fo:external-graphic src="path2file"> The image is in TIF-Format and is converted by the internal image process. The ...
Daniel Sommerfeld's user avatar
0 votes
1 answer
80 views

Converting pdf to images gives squares in text areas of the converted image

I'm trying to convert pdf to image using the following code, but the conversion is working fine but for each element in the pdf it gives a square over the element like for each text area there is a ...
user31731's user avatar
0 votes
0 answers
64 views

Image is rendered in white rather than the actual image using react-pdf in node.js

I am having a problem with showing images in my pdf generator that I am using @react-pdf/renderer, I switching the process of creating the PDF from client-side to server-side to reduce the load on the ...
Lafi Odeh's user avatar
-1 votes
1 answer
51 views

ImageMagick: shaded colors become total black [closed]

I need to convert a pdf file containing only one image to a .jpeg or .png format using ImageMagick. This is the image. Original PDF file: https://file.io/WMEsCGtbodwz Using the command line convert -...
user3204810's user avatar
1 vote
1 answer
156 views

PyPDF does not give me the right image

I am writing a python program to merge multiple PDFs containing images into one PDF, with the option to select specific pages from PDF source files, specify the order and other things. I'm using PyPDF ...
Andreas Kågedal's user avatar
1 vote
1 answer
57 views

Im trying to save imge in java as pdf

Here are my imports: package semestralka; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.image.BufferedImage; import java.awt....
CaptainAlpacaus's user avatar
0 votes
2 answers
151 views

Can I create a clickable hyperlink in a pdf using R magick?

I am using R and magick to create infographics as a PDF and want to inset a clickable hyperlink in the resultant PDF output. Is this possible to do within magick? Is there another option where I ...
DJD's user avatar
  • 83
0 votes
0 answers
61 views

Conversion from PDF to image fails in ghostscript

I need to convert the first page of a PDF file into an image using GhostScript, but I cannot manage to get an acceptable output file. I am calling the C++ library (ver. 10.03.0) directly from C# using ...
Davide Vitiello's user avatar
0 votes
0 answers
37 views

iText 7. Wrap text around image with TextAlignment.JUSTIFIED case

Is it possible to make justified text alignment with floating image correctly? Now it looks like this: My code: val writer = PdfWriter("HelloWorld.pdf") val pdf = PdfDocument(writer) val ...
Динар Исламов's user avatar
0 votes
0 answers
217 views

TCPDF - Image on Whole Page

I have a problem with TCPDF, I would like the photo to cover the entire page, but the changes added to the code, i.e. resize, fitbox, fitonpage, do not introduce the desired changes. The photo should ...
D A R K  VerbalCentaurPL's user avatar
0 votes
1 answer
396 views

How to convert multi-page PDF file to image without using pdf2Image?

I am trying to use pdf2image to convert a multi-page PDF to since image variable like it is done in Textractor code so that I can use it in LazyDocument: import pdf2image from pdf2image import ...
mjoy's user avatar
  • 700
1 vote
1 answer
1k views

Find, Replace and adjust image in PDF's using python

I have code in python which is finding and replacing a image in pdfs, but I'm having hard time adjusting the size of the new image so what the code is doing is finding the old image and it's using the ...
Shwapx's user avatar
  • 41
0 votes
0 answers
195 views

Chrome PDF print image aspect ratio incorrect - very apparent with small images - is there a workaround?

When printing to PDF from Google Chrome, strange things happen to small images. The images seem to alternate between being stretched or squished horizontally. It happens to all image types I've tried. ...
Harry Mustoe-Playfair's user avatar
0 votes
0 answers
34 views

How to show and change Image inside a Flask Route?

I am Trying to build a Library Management System using flask. The idea is there will be a homepage, where when clicked on a book, we will be redirected to a reader(also written in HTML), which will ...
Rishit Chakraborty's user avatar
0 votes
1 answer
145 views

Get black image but i don't know why

The following codes gives me a nearly black image import fitz import cv2 #opencv for preprocessing of image import numpy as np filename = 'sample_pdf\muscle model\Invoice of muscle model from ...
Kong Ting Chau's user avatar
0 votes
1 answer
2k views

Using PDF React Renderer, Images do not be displayed when downloaded

I have a strange issue whit React PDF Renderer. I have a document with an Image located on the public folder. There is no problem to displayed the image with de PDFViewer componant. But If I want to ...
Yggor's user avatar
  • 81
-1 votes
1 answer
281 views

Images randomly not rendering using wkhtmltopdf or DinkToPdf

When using DinkToPdf, had issues where random pictures would not render whether only 1 image or multiple were in the html being converted. The picture could be moved anywhere in the html, above other ...
Airo's user avatar
  • 68
0 votes
1 answer
358 views

MuPDF mutools question: can't get extract to work

Where does MuPDF's mutools put the image files it extracts? The official documentation says "The image and font files will be saved out to the same folder which the file originates from." ...
Ironword's user avatar
0 votes
0 answers
105 views

Image not found in asset catalog - SwiftUI

I have some images on the asset catalog, all of them working fine, but one in particular is giving me trouble. I have a set of images called "a1", "a2", "a3" and "a4&...
coni garcia's user avatar
1 vote
2 answers
400 views

Why do PDFs generated from HTML with images consume significantly more storage than the images themselves?

EDIT: The malfunction in Chromium was caused by a bug, which has since been fixed. Thank you to everyone who contributed to finding the solution! Why do PDFs generated from HTML with images consume ...
Barock's user avatar
  • 439
0 votes
2 answers
76 views

The argument type 'ImageProvider<Object>' can't be assigned to the parameter type 'ImageProvider'

I'm trying to display an Image in a PDF, using the Flutter pdf package. pw.Image( myImage ), This line is giving me the error The argument type 'ImageProvider<Object>' can't be assigned to the ...
kris's user avatar
  • 12.6k
-1 votes
1 answer
58 views

Identifying rectangular ducts and their inside information using Python [closed]

Click to see floor plan image: I'm a mechanical engineer and new to programming. I want to identify the different color rectangular ducts and information enclosed in them. Any help would be greatly ...
Atharva Purohit's user avatar
0 votes
1 answer
690 views

Flutter Syncfusion PDF and Images failing

I cannot get a document that is created to work at all when I incorporate and image anywhere on the page. It will work when running through the IDE but not once I build the package. I'm running it ...
FQHRFrenzy's user avatar
0 votes
1 answer
130 views

How to read a pdf containing multiple pages as images in Leptonica

Tesseract uses leptonica load images on which to do OCR: #include <tesseract/baseapi.h> #include <leptonica/allheaders.h> int main() { tesseract::TessBaseAPI *api = new tesseract::...
Dov's user avatar
  • 8,572
0 votes
0 answers
886 views

how to reduce the quality of all images in a pdf file using PyMuPDF

I am trying to make the maximum compression of the pdf file. To do this, I save the open pdf file using the method save(deflate=True, garbage=4, clean=True) But I also want to reduce the quality of ...
Mikhailo's user avatar
0 votes
3 answers
308 views

How to insert dynamic picture in PDF Document (ADOBE PRO or FoxIT)

I have a PDF document with one first page where I want to put a image based on the path + filename of the external image-file (JPG). If I change the picture (keeping path and filename), I want that ...
pmqdesousa's user avatar
0 votes
0 answers
316 views

Express.js - pdf2pic generated PNG image from PDFkit buffer stream comes out corrupted

I've created Express.js HTTP server that listens for POST request of body containing text. This text is then used by PDFkit library to generate PDF with the text as a body. I'm not saving the PDF on ...
richardevcom's user avatar
  • 1,058
0 votes
0 answers
32 views

Image alignment using after doing a document Conversion

private static void DownloadAndConvertToPDF(FileInfo originalFileInfo, string fileLocal, string filePdfName) { try { try { if (originalFileInfo.Extension.Equals(&...
Matheus Machado Coli's user avatar
1 vote
0 answers
252 views

Does flying-saucer-pdf-itext5 support the max-width attribute of the img?

I added an attribute max-width to the img tag. .half-img { max-width: 283px; } <table> <tr> <td class="table-top"> <div class="number&...
Cjsah's user avatar
  • 11
0 votes
1 answer
328 views

How to install `titling` package via RStudio?

I need to knit an rmarkdown document in pdf format, which would contain an image on top of the title. Reading on it at https://bookdown.org/yihui/rmarkdown-cookbook/latex-logo.html and some other ...
ForEverNewbie's user avatar
0 votes
0 answers
2k views

How to convert PDF to img in Next js

I am trying to convert a pdf file attached by user to image and for that I am using pdfjs-dist, I have done this implementation: "use client" import { useState, useEffect } from 'react'; ...
Hello World's user avatar
-1 votes
1 answer
2k views

Insert image in pdf file using python

I want to insert an image in a pdf using a python script. I have given a jpg as well as a png file. I want to be able to specify a page number, x and y coordinates and heigth and width of the image. ...
wittn's user avatar
  • 310
0 votes
1 answer
558 views

Gotenberg img convertion for pdf size opimization

I use https://gotenberg.dev/ docker image for converting html with img to pdf. I have a webp image of reasonable size. I generate pdf with pyhon code like with io.BytesIO() as tmp_index_html: ...
Ryabchenko Alexander's user avatar
0 votes
1 answer
1k views

Create a PDF file from HTML specified via URL

I would like to generate a PDF and Image file from HTML specified via URL(page) and send it to an external system. I need to perform this generation logic in java. The most popular and widely used ...
ezhil's user avatar
  • 1,093
0 votes
0 answers
3k views

Convert PDF to image in typescript

I want to convert PDF pages to images and show them in <img/>. I've searched a lot and found many libraries but they didn't work in typescript. I've installed pdf-img-convert, pdfjs-dist, and '...
change world's user avatar
0 votes
0 answers
107 views

Issue: Image hiding behind PDF element while embedding through Apache pdfbox library

I am using apache pdfbox jar to embed image to attached PDF with below JAVA code: import org.apache.pdfbox.io.MemoryUsageSetting; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox....
Yash Patel's user avatar
1 vote
1 answer
652 views

How to insert image in pdf using Java

I am trying to create pdfs with Java. I do not want to use libraries like ITextPdf but want to generate the raw code of the pdf with Java. I got the basics down and am able to create some pdfs. The ...
Casperca's user avatar
  • 121
0 votes
0 answers
75 views

Open an Image through specific app using PDF hyperlink

I have used pymupdf, fitz to insert hyperlinks into a PDF that lets me open images when the hyperlinks are clicked. Is it possible to specify a certain application to open the images with or will they ...
Musaub Shaikh's user avatar
1 vote
0 answers
52 views

In pdfbox, why does BufferImage and ImageXObject have different resolution

When I use pdfbox to extract jpeg 2000 image from a book, I found the BufferImage and ImageXObject have different resolution. The pdf file: https://drive.google.com/file/d/1yAfTFeAz6bfrcQOAEEm5MFMuPpM-...
tumuyan's user avatar
  • 31
3 votes
3 answers
6k views

How to remove images from PDF?

I have a batch of pdfs that contain images of digital signatures (encircled in green). What I want is to remove them or at least what is written on it but i couldnt find any solution, I've tried the ...
Felipe's user avatar
  • 41
0 votes
1 answer
308 views

Is it possible to embed a 360 degree viewer in a PDF using Python or some other language?

I have panoramas saved as jpg files. I need to embed a 360 degree viewer in the PDF in which I can view the panorama. I am working in Python but I am happy to run C++ code, Javascript or any other ...
Musaub Shaikh's user avatar
0 votes
1 answer
522 views

Converting a Base64 string to PDF in React

I've Base64 string and want to convert into PDF. My function works for a small Base64 string like text, images, emojis and all, but when I add images more than 50 KB (not sure) to the Base64 string ...
Jay Bagal's user avatar
0 votes
0 answers
67 views

Imagick library in windows (XAMPP)

I have been trying to use Imagick to convert a PDF file (base64/blob) to an image. But I receive an error when executing the code. I am using XAMPP in Windows. This is the error I am getting: Fatal ...
mdrr5545's user avatar
0 votes
0 answers
246 views

How to write a pdf using pdf writer in I.textSharp when it says null reference exception [duplicate]

var file = new FileStream("output.pdf", FileMode.Create); using (var document = new Document()) { PdfWriter writer = PdfWriter.GetInstance(document, file); } this is throwing null ...
Anmol's user avatar
  • 19
0 votes
0 answers
396 views

Convert PDF file into a preview Image inside react page

I'm trying once i upload a PDF to my site to display a lil preview of it instead of a PDF logo or some thing like that. Would appreciate if someone implemented some thing like that would help me with ...
Lightir's user avatar
0 votes
1 answer
126 views

getJpegSize could not find the size of the image

I am using jspdf and I am trying to show the image in pdf but I am getting an error Uncaught Error: getJpegSize could not find the size of the image I have tried to find the solution over Google but ...
Naren Verma's user avatar
  • 2,327

1
2 3 4 5
19