Japanese symbols are not shown in raster image in WinRT - pdf

I have a small trouble with Japanese symbols when I save rasterized PDF document into PNG. I tried to convert PDF file into the PNG with help of pitron.PDF.Rasterizer in my Windows Store application. Another files with embedded fonts are converted without problems, but this file does not contain embedded fonts and looks horrible.
Thanks, any help will be appreciated.

Please check that Аpitron.Core.Winrt.winmd is placed at the same folder as Аpitron.PDF.Rasterizer.dll.
Your PDF file requires external fonts and they could not be loaded at runtime without the types declared in metadata.

Related

font changing when trying to convert PDF to PowerPoint (PPT)

In my project there is a function to produce a PDF file based on a custom template for each customer. in order to do that I use SelectPDF, then add in ASP.NET Razor files and exporting it as a PDF. sometimes I'm asked for specific fonts, so I add them to my .LESS file for the template using #font-face.
now I have a task to create a PDF that may be later converted to a PowerPoint file via Adobe. the problem is that Adobe doesn't know how to handle the custom fonts I use.
for example, this is what I get with the PDF:
and this is what happens after I convert it via Adobe:
is it keep the custom fonts from the PDF export to the PowerPoint file
generally for such a font to be supported it should be 100% embeded as a font not subset as a range of characters.
Then the Full TTF name should be in the fontlist
If the pdf2pptx converter is doing its job correctly, and has access for fallback, it should then use RockwellNova, as seen here without embed and with embed
however since PPTX rarely embed the fonts it will be down to the system substitution when viewing the pptx.

How to convert a "pdf" to "odg" file with OpenOffice cmd

I can easily convert a pdf to an odt file using:
soffice --infilter="writer_pdf_import" --convert-to odt a.pdf
But when I try to do:
soffice --infilter="writer_pdf_import" --convert-to odg a.pdf
I get an error:
no export filter
TL;DR the answer is at the bottom but do read the following as to why there can be issues
ODG is a multi-part graphics file usually a blank template, often similar to an ORA, however there are many ways they can be structured and converted TO a set of PDF page printouts, as they contain thumbnails, plus one or more high resolution images or scalable vector graphics. Common variants can be used with Inkscape, Krita possibly Scribus / OODraw and other more GRAPHIC apps.
PDF is a page document output format thus not a suitable candidate for converting to professional images with scalar graphics. *Except see the last comment
ODG or ORA may be done well in image conversion but the reverse is not usually true.
Open Office Graphic is like a DocX, a zip wrapper around a core object, here it is a Jpeg but could be PNG SVG etc.
However the contents of the zip are not simple potentially running to thousands of lines of coding. Thus you need to use a more appropriate method to hand build an ODG not simple command line conversion from cruder PDF.
The real strength of a EXPORT from draw as PDF is the hybrid use of embedding ODFG content thus opening such a PDF you can edit it in Draw.
And it will look just as good in any PDF viewer. However it is too specialist to be simply translated without the app settings. In reality the PDF is the chimera/polyglot ODG.
But if you wish to try with simple files the command line is for a.pdf to a.odg
soffice --infilter="draw_pdf_import" --convert-to odg a.pdf

How to replace a specific image within a pdf?

I have a pdf with 3 images
I want to find each image and replace it with another image
I saw in the pdf the original paths under xmpMM:Ingredients:
I tried to change it via notepad++ but it looks like the images are already embedded and changing the path does nothing.
How can I find each image and replace it with another image?
The xmp stuff is information only. The actual images are embedded streams in the pdf file. Finding the correct streams to replace and replacing them isn't a simple problem, and can't be done with notepad. You'll need a library / toolkit that can modify PDFs, like https://pdf-lib.js.org/ or similar.
The PDF file looks like an Illustrator file, which adds another layer of weirdness - Illustrator can write PDFs that have both PDF and Illustrator versions of the content, and you see one in Acrobat and the other in Illustrator.
It's probably easier to recreate the PDF from whatever source produced it.

Convert pdf document to jpeg using LEADTOOLS and PDF-TOOLS

We have pdf documents (source: camera or scanner) that we want to convert to jpeg.
We use LEADTOOLS and PDF-TOOLS(in two separate programs) to convert these pdf files to jpeg files.
Both these tools use the default DPI of 150 irrespective of the DPI of the source pdf file.
We would rather like this value to be taken from the source pdf file.
For example: Adobe Acrobat software recognizes the source pdf file DPI and uses the same to create the jpeg file.
Is there some way we could achieve the same using the LEADTOOLS and PDF-TOOLS by determining the DPI of the source pdf file?
This feature was added to v19 of LEADTOOLS a few months ago. You can now extract images from PDF pages while preserving their original pixel dimensions using the following members of the Leadtools.Pdf.PDFDocument class:
ParseDocumentStructure method.
Images property.
DecodeImage method.
Furthermore, if the image is stretched inside the PDF page, you can detect that by examining its display size in the PDF page using the Leadtools.Pdf.PDFObject.Bounds property.
There's a dedicated demo for the PDFDocument class and related objects installed with LEADTOOLS 19 in these folders:
Examples\DotNet\CS\PDFDocumentDemo
Examples\DotNet\VB\PDFDocumentDemo

Is there any easy way to convert images inside a pdf file?

I have a few books that I absolutely MUST be reading; they are a set of calculus textbooks as PDF files. The problem is that the graphs and images in these pdf file are all png, which is apparently not supported by my kindle. Is there anyway I can convert these images as a batch into jpeg or any other format inside the pdf file. I have tried everything from converting the pdf to other formats (equation formatting didn't let it work), to extracting the images from the pdf file and getting them converted. I just really need to know if there is any program I can use to help me or if maybe, there is a way I could 'open' the pdf container, and switch out the png images for the jpeg images and replace the png file extensions with jpg. Any help would be greatly appreciated.
The books are:
http://tutorial.math.lamar.edu/pdf/CalcI/CalcI_Complete.pdf
http://tutorial.math.lamar.edu/pdf/CalcII/CalcII_Complete.pdf