converting pdf to image but after zooming inPython: Extract a page from a pdf as a jpegRecommended way to embed PDF in HTML?Proper MIME media type for PDF filesConvert HTML + CSS to PDF with PHP?Lazy load of images in ListViewConverting a PDF to PNGMerge / convert multiple PDF files into one PDFFast and Lean PDF Viewer for iPhone / iPad / iOs - tips and hints?How to vertically align an image inside a div?Tika duplicates text when used with Tesseract on OCR PDFHow to convert a PDF image or an image to text using Tesseract and/or Poppler?

Is there really no use for MD5 anymore?

Does a semiconductor follow Ohm's law?

How to make a pipeline wait for end-of-file or stop after an error?

Is there an official tutorial for installing Ubuntu 18.04+ on a device with an SSD and an additional internal hard drive?

Can someone publish a story that happened to you?

Exchange,swap or switch

Was there a shared-world project before "Thieves World"?

Critique of timeline aesthetic

How to pronounce 'C++' in Spanish

What is the strongest case that can be made in favour of the UK regaining some control over fishing policy after Brexit?

Why do Computer Science majors learn Calculus?

Is it possible to determine the symmetric encryption method used by output size?

Meaning of Bloch representation

How would one muzzle a full grown polar bear in the 13th century?

Will tsunami waves travel forever if there was no land?

Is there any limitation with Arduino Nano serial communication distance?

Fizzy, soft, pop and still drinks

What route did the Hindenburg take when traveling from Germany to the U.S.?

Mac Pro install disk keeps ejecting itself

Is there a way to get a compiler for the original B programming language?

How could Tony Stark make this in Endgame?

What does the "ep" capability mean?

Examples of subgroups where it's nontrivial to show closure under multiplication?

How to solve constants out of the internal energy equation?



converting pdf to image but after zooming in


Python: Extract a page from a pdf as a jpegRecommended way to embed PDF in HTML?Proper MIME media type for PDF filesConvert HTML + CSS to PDF with PHP?Lazy load of images in ListViewConverting a PDF to PNGMerge / convert multiple PDF files into one PDFFast and Lean PDF Viewer for iPhone / iPad / iOs - tips and hints?How to vertically align an image inside a div?Tika duplicates text when used with Tesseract on OCR PDFHow to convert a PDF image or an image to text using Tesseract and/or Poppler?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








5















This link shows how pdfs could be converted to images. Is there a way to zoom my pdfs before converting to images? In my project, i am converting pdfs to pngs and then using Python-tesseract library to extract text. I noticed that if I zoom pdfs and then save parts as pngs then OCR provides much better results. So is there a way to zoom pdfs before converting to pngs?










share|improve this question

















  • 1





    You can also create a High resolution image from PDF and crop the image section which you need to OCR.

    – flamelite
    Mar 27 at 13:16











  • could you show how to do that? I need to do OCR on the whole page

    – user2543622
    Mar 27 at 14:51












  • could you provide some pdf examples?

    – Liam
    Mar 28 at 17:44

















5















This link shows how pdfs could be converted to images. Is there a way to zoom my pdfs before converting to images? In my project, i am converting pdfs to pngs and then using Python-tesseract library to extract text. I noticed that if I zoom pdfs and then save parts as pngs then OCR provides much better results. So is there a way to zoom pdfs before converting to pngs?










share|improve this question

















  • 1





    You can also create a High resolution image from PDF and crop the image section which you need to OCR.

    – flamelite
    Mar 27 at 13:16











  • could you show how to do that? I need to do OCR on the whole page

    – user2543622
    Mar 27 at 14:51












  • could you provide some pdf examples?

    – Liam
    Mar 28 at 17:44













5












5








5








This link shows how pdfs could be converted to images. Is there a way to zoom my pdfs before converting to images? In my project, i am converting pdfs to pngs and then using Python-tesseract library to extract text. I noticed that if I zoom pdfs and then save parts as pngs then OCR provides much better results. So is there a way to zoom pdfs before converting to pngs?










share|improve this question














This link shows how pdfs could be converted to images. Is there a way to zoom my pdfs before converting to images? In my project, i am converting pdfs to pngs and then using Python-tesseract library to extract text. I noticed that if I zoom pdfs and then save parts as pngs then OCR provides much better results. So is there a way to zoom pdfs before converting to pngs?







image pdf ocr python-tesseract poppler






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 17:58









user2543622user2543622

1,090144283




1,090144283







  • 1





    You can also create a High resolution image from PDF and crop the image section which you need to OCR.

    – flamelite
    Mar 27 at 13:16











  • could you show how to do that? I need to do OCR on the whole page

    – user2543622
    Mar 27 at 14:51












  • could you provide some pdf examples?

    – Liam
    Mar 28 at 17:44












  • 1





    You can also create a High resolution image from PDF and crop the image section which you need to OCR.

    – flamelite
    Mar 27 at 13:16











  • could you show how to do that? I need to do OCR on the whole page

    – user2543622
    Mar 27 at 14:51












  • could you provide some pdf examples?

    – Liam
    Mar 28 at 17:44







1




1





You can also create a High resolution image from PDF and crop the image section which you need to OCR.

– flamelite
Mar 27 at 13:16





You can also create a High resolution image from PDF and crop the image section which you need to OCR.

– flamelite
Mar 27 at 13:16













could you show how to do that? I need to do OCR on the whole page

– user2543622
Mar 27 at 14:51






could you show how to do that? I need to do OCR on the whole page

– user2543622
Mar 27 at 14:51














could you provide some pdf examples?

– Liam
Mar 28 at 17:44





could you provide some pdf examples?

– Liam
Mar 28 at 17:44












1 Answer
1






active

oldest

votes


















6





+50









I think that raising the quality (resolution) of your image is a better solution than zooming into the pdf.



using pdf2image you can accomplish this quite easily:



install pdf2image: pip install pdf2image



then, in python, convert your pdf into a high quality image:



from pdf2image import convert_from_path

pages = convert_from_path('sample.pdf', 400) //400 is the Image quality in DPI (default 200)

pages[0].save("sample.png")


by playing around with the quality parameter you should get the result you desider






share|improve this answer


















  • 1





    any idea how high we could go on DPI? please provide a documentation link. I tried python help but it was that useful

    – user2543622
    Mar 28 at 23:32






  • 1





    @user2543622 it depends on the pdf you are working on and your computer memory, here is the wikipedia link for dpi:en.wikipedia.org/wiki/Dots_per_inch

    – Liam
    Mar 29 at 19:46











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305385%2fconverting-pdf-to-image-but-after-zooming-in%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









6





+50









I think that raising the quality (resolution) of your image is a better solution than zooming into the pdf.



using pdf2image you can accomplish this quite easily:



install pdf2image: pip install pdf2image



then, in python, convert your pdf into a high quality image:



from pdf2image import convert_from_path

pages = convert_from_path('sample.pdf', 400) //400 is the Image quality in DPI (default 200)

pages[0].save("sample.png")


by playing around with the quality parameter you should get the result you desider






share|improve this answer


















  • 1





    any idea how high we could go on DPI? please provide a documentation link. I tried python help but it was that useful

    – user2543622
    Mar 28 at 23:32






  • 1





    @user2543622 it depends on the pdf you are working on and your computer memory, here is the wikipedia link for dpi:en.wikipedia.org/wiki/Dots_per_inch

    – Liam
    Mar 29 at 19:46















6





+50









I think that raising the quality (resolution) of your image is a better solution than zooming into the pdf.



using pdf2image you can accomplish this quite easily:



install pdf2image: pip install pdf2image



then, in python, convert your pdf into a high quality image:



from pdf2image import convert_from_path

pages = convert_from_path('sample.pdf', 400) //400 is the Image quality in DPI (default 200)

pages[0].save("sample.png")


by playing around with the quality parameter you should get the result you desider






share|improve this answer


















  • 1





    any idea how high we could go on DPI? please provide a documentation link. I tried python help but it was that useful

    – user2543622
    Mar 28 at 23:32






  • 1





    @user2543622 it depends on the pdf you are working on and your computer memory, here is the wikipedia link for dpi:en.wikipedia.org/wiki/Dots_per_inch

    – Liam
    Mar 29 at 19:46













6





+50







6





+50



6




+50





I think that raising the quality (resolution) of your image is a better solution than zooming into the pdf.



using pdf2image you can accomplish this quite easily:



install pdf2image: pip install pdf2image



then, in python, convert your pdf into a high quality image:



from pdf2image import convert_from_path

pages = convert_from_path('sample.pdf', 400) //400 is the Image quality in DPI (default 200)

pages[0].save("sample.png")


by playing around with the quality parameter you should get the result you desider






share|improve this answer













I think that raising the quality (resolution) of your image is a better solution than zooming into the pdf.



using pdf2image you can accomplish this quite easily:



install pdf2image: pip install pdf2image



then, in python, convert your pdf into a high quality image:



from pdf2image import convert_from_path

pages = convert_from_path('sample.pdf', 400) //400 is the Image quality in DPI (default 200)

pages[0].save("sample.png")


by playing around with the quality parameter you should get the result you desider







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 28 at 17:48









LiamLiam

2,61121838




2,61121838







  • 1





    any idea how high we could go on DPI? please provide a documentation link. I tried python help but it was that useful

    – user2543622
    Mar 28 at 23:32






  • 1





    @user2543622 it depends on the pdf you are working on and your computer memory, here is the wikipedia link for dpi:en.wikipedia.org/wiki/Dots_per_inch

    – Liam
    Mar 29 at 19:46












  • 1





    any idea how high we could go on DPI? please provide a documentation link. I tried python help but it was that useful

    – user2543622
    Mar 28 at 23:32






  • 1





    @user2543622 it depends on the pdf you are working on and your computer memory, here is the wikipedia link for dpi:en.wikipedia.org/wiki/Dots_per_inch

    – Liam
    Mar 29 at 19:46







1




1





any idea how high we could go on DPI? please provide a documentation link. I tried python help but it was that useful

– user2543622
Mar 28 at 23:32





any idea how high we could go on DPI? please provide a documentation link. I tried python help but it was that useful

– user2543622
Mar 28 at 23:32




1




1





@user2543622 it depends on the pdf you are working on and your computer memory, here is the wikipedia link for dpi:en.wikipedia.org/wiki/Dots_per_inch

– Liam
Mar 29 at 19:46





@user2543622 it depends on the pdf you are working on and your computer memory, here is the wikipedia link for dpi:en.wikipedia.org/wiki/Dots_per_inch

– Liam
Mar 29 at 19:46



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305385%2fconverting-pdf-to-image-but-after-zooming-in%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript