Highlighted

Open a vector based pdf file in Photoshop at a percentage of it's original size

Explorer ,
Oct 01, 2020

Copy link to clipboard

Copied

I have a folder of vector pdf documents with various document sizes. While they are all different, the page size for each of these pdfs is exactly 4 times larger than they need to be.(This is due to an export limitation in the CAD software used to produce them) If I have one of them already open in Photoshop, I have the option rezize that image by inches, centimeters or a percentage of the original size. However, when opening the pdf, I do not have the percentage option. 

 

I have already been resizing these pdfs to 25% using image>image size, but I need to create pixel perfect images and I have found that each of the down sampling methods yeild inconsistent results.

I have also manually reduced the width and height values for each document while opening it, this seems to work, but I also need to automate this process and can't use a fixed dimension in my batch script.

 

Finally, I have tried to use Illustrator to open and reduce the size of the documents, but the CAD program which creates the pdfs does not play nice with Illustrator, so when I open the documents with illustrator there are shading and other problems. 

 

Does anyone know a way to open a pdf at a percentage of the original size rather than by a defined width and height?

TOPICS
Feature request, How to, Import and export

Views

146

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Open a vector based pdf file in Photoshop at a percentage of it's original size

Explorer ,
Oct 01, 2020

Copy link to clipboard

Copied

I have a folder of vector pdf documents with various document sizes. While they are all different, the page size for each of these pdfs is exactly 4 times larger than they need to be.(This is due to an export limitation in the CAD software used to produce them) If I have one of them already open in Photoshop, I have the option rezize that image by inches, centimeters or a percentage of the original size. However, when opening the pdf, I do not have the percentage option. 

 

I have already been resizing these pdfs to 25% using image>image size, but I need to create pixel perfect images and I have found that each of the down sampling methods yeild inconsistent results.

I have also manually reduced the width and height values for each document while opening it, this seems to work, but I also need to automate this process and can't use a fixed dimension in my batch script.

 

Finally, I have tried to use Illustrator to open and reduce the size of the documents, but the CAD program which creates the pdfs does not play nice with Illustrator, so when I open the documents with illustrator there are shading and other problems. 

 

Does anyone know a way to open a pdf at a percentage of the original size rather than by a defined width and height?

TOPICS
Feature request, How to, Import and export

Views

147

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 01, 2020 0
LEGEND ,
Oct 01, 2020

Copy link to clipboard

Copied

»I have already been resizing these pdfs to 25% using image>image size, but I need to create pixel perfect images and I have found that each of the down sampling methods yeild inconsistent results.«

Please elaborate and post meaningdul screenshots to illustrate what you mean. 

 

Have you tried converting the pdfs with a quarter of the intended resolution and then changing the resolution without resampling? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 01, 2020 1
Adobe Community Professional ,
Oct 02, 2020

Copy link to clipboard

Copied

Do you meant that resamling in Photoshop does not produce good results? Can you post some examples?

 

Another way to try tings is using Export panel in Bridge. From my testing it works to convert PDF to JPEG only, other file formats which are available will display unsuported file format error message. You can use percentages to scale resulting image.

scale by percent bridge export.jpg

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2020 1
Explorer ,
Oct 02, 2020

Copy link to clipboard

Copied

See screenshots below.

The shape on the left is from one pdf and the shape on the right is from another. Each was opened in photoshop at the original size and resolution. They have been composited together in photoshop to illustrate to illustrate the issue. Each shape is on it's own layer. Note that the horizontal cylinder on the left and right are both the same, but the layer on the left has additional information on the left vertical edge. 

all.png

 

The detail below is from the pdfs imported at their original size. Notice that the horizontal line (area between the cyan guidelines) is 20 pixels for each. I would expect this area to sample down consistently.

 

100_percent.png

 

Below are the settings I used to down sample. I used nearest neighbor because it illustrates the problem best, but I have similar results with the other methods. Also, I know that I used 25% as an example earlier, but I actually need the images at 12.5% of the original scale. 

settings.png

 

The next image is a detail of the same file after resizing in photoshop. As you can see, the 20 pixel line on the left became 2 pixels tall while the line on the right became 3 pixels tall. 

down_sampled.png

 

I assume that the resize algorithm is somehow averaging the other areas of the layer which could account for the difference. Ultimately these images will be composited together and will need to maintain a consistent lineweight. They will be saved as .png files and also require transparency. 

 

Finally, limitations in the CAD software prohibit me from exporting the files at the proper output scale, resolution or file format.  I am not sure if opening these at a reduced scale would solve the problem or not, but any ideas on how to consistently resize these images is greatly appreciated. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2020 0
LEGEND ,
Oct 03, 2020

Copy link to clipboard

Copied

What happens when you convert the two images to one Smart Object before scaling? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 03, 2020 0
Explorer ,
Oct 05, 2020

Copy link to clipboard

Copied

When the layers from this example are merged into one, then scaled, the resampling behaves as expected. Notice that both horizontal black lines are now 2 pixels tall. Unfortunately, I can not merge and process these pdf files together. I will need to be able to resize the individual files separately with consistent line weights.  

merged.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 05, 2020 0
Adobe Community Professional ,
Oct 02, 2020

Copy link to clipboard

Copied

Have you tried placing the PDF as a Smart Object? (File > Place Embedded/Place Linked)

 

That would have two advantages. As a Smart Object, when it’s in Free Transform mode (Edit > Free Transform) you can type its scaling percentage into the options bar. Unfortunately, I don’t know how to script that. The second advantage would be continuous rasterization: It remains a vector object in the Photoshop document. I wonder if keeping it as a vector object would help with the resampling artifacts.

 

Which brings up another question: What are the dimensions and ppi in Image > Image Size, or in the Import PDF dialog box? Because a vector object, Smart Object or not, can be rendered only as far as the pixel dimensions of the Photoshop document. I’m wondering if a PDF vector Smart Object will have fewer artifacts if it’s rendered in a Photoshop document with higher resolution.

 

Also, because there are so many resampling artifacts, another question comes up: Did the CAD program actually export vector paths into the PDF, or did it actually export pixels?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 02, 2020 0
Explorer ,
Oct 05, 2020

Copy link to clipboard

Copied

Keeping the object vector in photoshop would be more ideal, however it does not seem to work for me in this scenario. The CAD program (Solid Edge) requires that I export the pdf files at 1200 ppi to maintain shading and transparency. I have found that if I place the files into photoshop, or if I open them at any resolution other than 1200 ppi, I get problems with the shading and transparency. 

 

The pdf files generated by Solid Edge are actually a hybrid between vector and raster. The lines are vector but the shading is rasterized. 

 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 05, 2020 0
Adobe Community Professional ,
Oct 05, 2020

Copy link to clipboard

Copied

I see. The fact that Solid Edge is exporting a vector/raster hybrid does go a long way toward explaining why the usual solutions aren’t helping here. That helps us understand why this is a complicated problem.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 05, 2020 0
Explorer ,
Oct 06, 2020

Copy link to clipboard

Copied

It is indeed complicated. In this case, I don't think that the raster elements are a factor. I opened the pdf files in illustrator and removed the raster shading, then did the same process in Photoshop, and got the same result. See screenshots below.
Both Layers
Screenshot-all.png

Detail at full size

Screenshot-full-size.png

Scale Settings

Screenshot-settings.png

Result

Screenshot-reduced.png

 

I also tried opening the pdf files in Illustrator and scaling them down there, then exporting png files directly from Illustrator. Sometimes opening them in illustrator messes up the shading, and sometimes it does not, but either way, I had mixed results with the line weights. If I exported the image without anti-aliasing, I got a consistent 2 pixel line weight. However if I used anti-aliasing the line weight was different for the two images. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 06, 2020 0